[phpwebapp-improvments] [phpwebapp - phpWebApp Improvements] TableRS
Brought to you by:
dashohoxha
From: SourceForge.net <no...@so...> - 2003-07-30 09:53:28
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=2127147 By: dashohoxha A "TableRS" is an editable RS which is associated with a table in a DB. After editing this RS, the programer can save the changes back to DB. For example: //open the recordset $fld_list = "field1, field2, field3"; //optional, default "*" $condition = "... AND ... OR ..."; //SQL WHERE condition, optional $rs = new TableRS("tbl_name", $fld_list, $condition); //make some changes to the recordset $rs->MoveNext(); $rs->rmRec(); //remove the second record $rs->find("field1='$value'"); do { $rs->setFld("field2", $value2); } while ($rs->find_next()); $rs->MoveLast(); $rec = array("field1"=>$val1, "field2"=>$val2, "field3"=>$val3); $rs->addRec($rec); //save in the DB table all the changes made to the recordset $rs->save(); ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=135220 |