Re: [PHP-DB] Inserting NULL values does not work

2002-02-02 Thread Andrés Felipe Hernández
] Inserting NULL values does not work Your problem is that you've included the value of $park in single-quotes. Therefore, because it contains NULL, i.e., \0, this is translated to '0' in the INSERT statement. You must make your test prior to the INSERT statement and use the proper $park

RE: [PHP-DB] Inserting NULL values does not work

2002-02-01 Thread Rick Emery
Your problem is that you've included the value of $park in single-quotes. Therefore, because it contains NULL, i.e., \0, this is translated to '0' in the INSERT statement. You must make your test prior to the INSERT statement and use the proper $park value. Or, you can: if ($park == 'false'){

Re: [PHP-DB] Inserting NULL values does not work

2002-02-01 Thread Oliver Cronk
Why not make it a function which also checks and replaces for characters SQL fails on eg if ' replace with '' in strings etc, and does any sanity / validation checks at the same time? Ollie Rick Emery [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Your problem is that you've

RE: [PHP-DB] Inserting NULL values does not work

2002-02-01 Thread Rick Emery
It's not failing on the single-quotes. MYSQL can use single-quotes. -Original Message- From: Oliver Cronk [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 10:01 AM To: Php-Db ML; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Inserting NULL values does not work Why not make

RE: [PHP-DB] Inserting NULL values does not work

2002-02-01 Thread Oliver Cronk
Like this for example: http://www.phpbuilder.com/snippet/download.php?type=snippetid=378 -Original Message- From: Oliver Cronk [mailto:[EMAIL PROTECTED]] Sent: 01 February 2002 16:01 To: Php-Db ML; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Inserting NULL values does not work Why

RE: [PHP-DB] Inserting NULL values does not work

2002-02-01 Thread Oliver Cronk
: [PHP-DB] Inserting NULL values does not work It's not failing on the single-quotes. MYSQL can use single-quotes. -Original Message- From: Oliver Cronk [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 10:01 AM To: Php-Db ML; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Inserting NULL

RE: [PHP-DB] Inserting NULL values does not work

2002-02-01 Thread Rick Emery
PROTECTED]'; Php-Db ML Subject: RE: [PHP-DB] Inserting NULL values does not work It's not failing on the single-quotes. MYSQL can use single-quotes. -Original Message- From: Oliver Cronk [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 10:01 AM To: Php-Db ML; [EMAIL PROTECTED

Re: [PHP-DB] Inserting NULL values does not work

2002-02-01 Thread Oliver Cronk
:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 10:41 AM To: Rick Emery; [EMAIL PROTECTED]; Php-Db ML Subject: RE: [PHP-DB] Inserting NULL values does not work I know its not failing on YOUR example but if there is a single quote in the data eg someones name is O'leary then the SQL will fail