Re: [PHP-DB] Question on how to test a value

2001-07-26 Thread Dobromir Velev
Hi, even if there was no data in the price field when the form was submited the $price variable exists and isset($price) returns true. May be you could try !empty($price) instead of isset($price) - Something like. $query7 = !empty($price) ? INSERT INTO price (itemid, price) VALUES ($itemid,

[PHP-DB] Question on how to test a value

2001-07-25 Thread Lara J. Fabans
Hi, friends, Here is how I'm putting the information into the database: $query7 = isset($price) ? INSERT INTO price (itemid, price) VALUES ($itemid, '$price') : 0; $result7 = @pg_Exec($connection, $query7 ); I'm having difficulties with my test in display. I've tried isset and == 'NULL' and ==