Database Abstraction Layer for PHP

User Tools

Site Tools


This is an old revision of the document!


 * Should prepare the sql statement and return the stmt resource.
 * For databases that do not support this, we return the $sql. To ensure
 * compatibility with databases that do not support prepare:
 *   $stmt = $db->Prepare("insert into table (id, name) values (?,?)");
 *   $db->Execute($stmt,array(1,'Jill')) or die('insert failed');
 *   $db->Execute($stmt,array(2,'Joe')) or die('insert failed');
 * @param sql	SQL to send to database
 * @return return FALSE, or the prepared statement, or the original sql if
 *         if the database does not support prepare.
v5/reference/connection/prepare.1448934108.txt.gz · Last modified: 2017/04/21 11:33 (external edit)