RE: [PHP] PHP, MySQL and null?
| From: | Jonas Thorell | Date: | Sun, 27 Jul 2003 15:10:13 +0000 |
| Subject: | RE: [PHP] PHP, MySQL and null? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157083@lists.php.net to get a copy of this message | ||
Sorry, wrote wrong here so one more try.
Well, no. But that's not where the problem is. If I was unclear - the
id-field work as it should. It's when I try to use A variable in the
query-string the problem pops up.
IOW - INSERT INTO SITE (id,name,url,comment) VALUES
(null,'testname','testurl',null)
Works
INSERT INTO SITE (id,name,url,comment) VALUES
(null,'$name','$url','$comment')
Does not when I've set $comment=null;
If every field has a proper value (when everything had been filled in on the
form), Everything works as expected.
/Jonas
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.501 / Virus Database: 299 - Release Date: 2003-07-14