For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > May 2007 > autoexecute and NULL values









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author autoexecute and NULL values
Kevin McCarthy

2007-05-21, 10:02 pm

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.

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.

Any help appreciated. TIA

--
Kevin McCarthy
kemccarthy1@gmail.com

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com