Re: autoexecute and NULL values
| From: | Justin Patrin | Date: | Tue, 22 May 2007 01:20:40 +0000 |
| Subject: | Re: autoexecute and NULL values | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-27346@lists.php.net to get a copy of this message | ||
On 5/21/07, Kevin McCarthy <kemccarthy1@gmail.com> wrote:
In learning to PEAR DB, I am stumped on how to use autoExecute() for INSERT or UPDATE when some fields should be set as NULL in the database record. If I leave the field empty, this does not translate to NULL in the actual query generated yielding an error when a value is expected.What do you mean by empty and what is the generated query?
I could simply check each field set in the autoExecute() fields array before including it but I'd expect that there is a more elegant solution.Perhaps you should include a few lines of code to show us what you're doing and what you expect. -- Justin Patrin