On 6/30/09 1:31 PM, "Tom Worster" <fsb@xxxxxxxxxx> wrote: On 6/30/09 11:17 AM, "Ashley Sheridan" <ash@xxxxxxxxxxxxxxxxxxxx> wrote: > It's a bad way of doing it, but could you not create a unique index on the > particular key you want to be unique, and then just try the select anyway > with the mysql_query() call preceeded with an @ to suppress warnings? if you're going that route and your DB supports it, use INSERT IGNORE. if the primary/unique key makes sense for the application then i don't think this is all that bad a way of doing things. This is the error: Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/getpublished.news-leader.com/httpdocs/ResturantInspections/compare.php on line 114 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/getpublished.news-leader.com/httpdocs/ResturantInspections/compare.php on line 118 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Roast Beef Restaurant #9459', ' 1833 W Republic Rd ', '3/2/09', '' at line 1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php