Re: mysql if empty
| From: | tedd | Date: | Tue, 10 Apr 2007 12:14:19 +0000 |
| Subject: | Re: mysql if empty | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-252407@lists.php.net to get a copy of this message | ||
At 10:18 PM +0100 4/9/07, <chris@aquanuke.com> wrote:
If I search for something in mysql that returns an empty result I cant get it to return "No result found" always returns "Found" even though the recoed does not exist... $sql = "SELECT Client FROM booked WHERE Name = 'larry'"; $result = mysql_query($sql); if ($result == "") { echo "No result found"; } echo "Found";Try NULL Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com