MDB2 autoPrepare statements

From: Date: Tue, 17 Aug 2010 13:25:06 +0000
Subject: MDB2 autoPrepare statements
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-30699@lists.php.net to get a copy of this message
Dear MDB2 users, I have scoured through the MDB2 documentation, but have been unable to locate any documentation on the types array that can be passed to the autoPrepare command. Actually the problem may be the documentation for the MDB2 Prepare command which is called behind the scenes by autoPrepare. Looking at : http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2_Driver_Common.html#methodprepare we find in documentation: prepare [line 2933] mixed &prepare( string $query, [mixed $types = null], [mixed $result_types = null], [mixed $lobs = array()]) What are the valid values I can send in for the individual types? I find the following reference at http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2_Driver_Datatype_Common.html $valid_default_values = array( 'text' => '', 'boolean' => true, 'integer' => 0, 'decimal' => 0.0, 'float' => 0.0, 'timestamp' => '1970-01-01 00:00:00', 'time' => '00:00:00', 'date' => '1970-01-01', 'clob' => '', 'blob' => '', ) So, are these the types that can be used? I was hoping to be able to map these from their names to the values returned by this mysql statement: $result = mysql_query('SHOW COLUMNS FROM ' . $table_name); Thanks for helping out here. If there is a reference that I missed short of digging through all the layers of code and finding it seven layers deep, please point me at it. Otherwise, thank you for sharing your superior knowledge. Bradley Slavik

« previous php.pear.general (#30699) next »