ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:autoexecute

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
v5:reference:connection:autoexecute [2021/01/25 03:04] mnewnhamv5:reference:connection:autoexecute [2021/01/25 03:07] (current) mnewnham
Line 22: Line 22:
 The function ''autoExecute()'' can automatically generate and execute INSERT and UPDATE statements on a given table with this function, and is a wrapper for [[v5:reference:connection:getinsertsql|getInsertSQL()]] and [[v5:reference:connection:getupdatesql|getUpdateSQL()]] The function ''autoExecute()'' can automatically generate and execute INSERT and UPDATE statements on a given table with this function, and is a wrapper for [[v5:reference:connection:getinsertsql|getInsertSQL()]] and [[v5:reference:connection:getupdatesql|getUpdateSQL()]]
  
-autoExecute() inserts or updates **$table** given an array of **$arrFields**, where the keys are the field names and the array values are the field values to store. Note that there is some overhead because the table is first queried to extract key information before the SQL is generated. An INSERT or UPDATE is generated based on `$mode(see below). +autoExecute() inserts or updates **$table** given an array of **$arrFields**, where the keys are the field names and the array values are the field values to store. Note that there is some overhead because the table is first queried to extract key information before the SQL is generated. An INSERT or UPDATE is generated based on **$mode** (see below). 
  
 ==== $table ==== ==== $table ====
Line 47: Line 47:
    
 ==== Usage ==== ==== Usage ====
- +<code php> 
-autoExecute($table, $arrFields, $mode, $where=false, $forceUpdate=true,$magicq=false+autoExecute($table, $arrFields, $mode, $where=false, $forceUpdate=true) 
 +</code>
  
 === Insert example === === Insert example ===
v5/reference/connection/autoexecute.txt · Last modified: 2021/01/25 03:07 by mnewnham