Jump to content

Blank Row Being Inserted in Top of MySQL.


Jeffro

Recommended Posts

Shouldn't the following stop a blank row from being inserted into mysql? 

I have a description and a date but it still keeps putting a blank row before my insert and I've tried everything.... 

 

if($myvar != ''){

mysql_query("INSERT IGNORE INTO products (description, time) VALUES('$myvar',NOW() ) ")

or die(mysql_error());

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.