ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:getupdatesql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
v5:reference:connection:getupdatesql [2016/01/16 22:15]
mnewnham ↷ Page moved from v5:reference:getupdatesql to v5:reference:connection:getupdatesql
v5:reference:connection:getupdatesql [2019/12/26 05:50] (current)
peterdd fix typo in example
Line 72: Line 72:
  
 $SQL = '​SELECT * FROM employees WHERE emp_no=10001';​ $SQL = '​SELECT * FROM employees WHERE emp_no=10001';​
-$result = $db->Execute($SQL);+$result = $db->execute($SQL);
  
 $updateArray = array('​first_name'​=>'​Jerry',​ $updateArray = array('​first_name'​=>'​Jerry',​
Line 78: Line 78:
       '​gender'​=>'​M'​);​       '​gender'​=>'​M'​);​
  
-$SQL = $db->​getUpdateSql($result,​$updateArray);​ +$SQL = $db->​getUpdateSql($result,​ $updateArray);​
- +
-print $SQL+
 /* /*
- * returnsUPDATE employees ​+ * returns 
 + ​* ​UPDATE employees ​
               SET FIRST_NAME='​Jerry', ​               SET FIRST_NAME='​Jerry', ​
                   LAST_NAME='​O\'​reilly' ​                   LAST_NAME='​O\'​reilly' ​
Line 94: Line 93:
  
 <code php> <code php>
-$SQL = $db->​getUpdateSql($result,​$updateArray.true);+$SQL = $db->​getUpdateSql($result,​ $updateArraytrue);
 /* /*
  * returns  * returns
v5/reference/connection/getupdatesql.txt · Last modified: 2019/12/26 05:50 by peterdd