> INSERT INTO testtab2
>                 VALUES ( upper('$symbol'), '$two_liner', '$href',
>                          '$full_desc', '$submitter_name',
>          '$submitter_email', CURRENT_TIMESTAMP )
> 
> I hate to muck them up with a bunch of tests for empty vars, which then
> need to be replaced with NULL and have the single quotes ommited, etc. if
> there is some more graceful way?

$foo = strlen($foo) ? "'$foo'" : 'NULL';
.
.
.
$query = "insert into bar (foo,...) values($foo,...)";

-- 
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to