PEAR Handbuch | ||
---|---|---|
Zurück | Nach vorne |
autoPrepare() requires an ordered array like :
array('field1', 'field2', 'field3', ...) |
"INSERT INTO $table (field1,field2,field3,...) VALUES (?,?,?)" |
"UPDATE $table SET field1=?,field2=?,field3=?,... WHERE $where" |
There is two modes :
DB_AUTOQUERY_INSERT - build insert queries |
DB_AUTOQUERY_UPDATE - build update queries |
Parameter
$table - name of the table
$table_fields - ordered array containing the fields names
$mode - type of query to make (DB_AUTOQUERY_INSERT or DB_AUTOQUERY_UPDATE)
$where - in case of update queries, this string will be put after the sql WHERE statement
Returns
resource - the query handle
Zurück | Zum Anfang | Nach vorne |
DB::prepare() | Nach oben | DB::execute() |