Re: Question on mysql_fetch_object()
| From: | Jason Wong | Date: | Sat, 23 Oct 2004 06:05:39 +0000 |
| Subject: | Re: Question on mysql_fetch_object() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-200142@lists.php.net to get a copy of this message | ||
On Saturday 23 October 2004 13:05, Walter Wojcik wrote:
> I am trying to write a script that checks a table for a value in MySQL. It
> opens the table and queries it fine but if my query returns nothing i have
> no way of testing to see if it returned anything. I have tried testing for
> "false" and "" and ! $result in a if statement but i don't know what
> to do.
> How do I check to see if i got anything or not without getting this:
> "Notice: Trying to get property of non-object ". This is my most current
> version of the code:
mysql_num_rows()
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Boy, am I glad it's only 1971...
*/