> If I do something like:
> 
> $string = null;
> 
> mysql_query("insert ignore into table(field) values($string)");
> 
> It gives me an error.

Pass a string value of 'NULL'.

Ie INSERT INTO table (field) VALUES (NULL);

Or, in your example:

$string = 'NULL';
mysql_query("INSERT INTO table (field) VALUES ($string)");

Much warmth,

Murray
http://www.planetthoughtful.org
Building a thoughtful planet,
One quirky comment at a time.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to