DB: how can I include the MySQL function CURDATE() in table values of autoPrepare?
| From: | l Burnerheimerton | Date: | Thu, 08 Sep 2005 09:30:22 +0000 |
| Subject: | DB: how can I include the MySQL function CURDATE() in table values of autoPrepare? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-20858@lists.php.net to get a copy of this message | ||
Below is an INSERT statement using autoprepare. I
want to use CURDATE so that the date field has a date
stamp and does not change when updated.
It fails because the CURDATE() is not a PHP function.
Error message is:
undefined function: curdate()
How can I get it to use CURDATE()?
$tbl = 'company_job_post';
$tblF = array('field1', ...);
$tblV = array(value1,..., CURDATE());
$s = $dbh->autoPrepare($tbl, $tblF,
DB_AUTOQUERY_INSERT);
$res =& $dbh->execute($s, $tblV);
______________________________________________________
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/