Re: Best way to figure out whether a query returns RESULT or NON-RESULT
| From: | Karam Chand | Date: | Sun, 17 Oct 2004 04:51:48 +0000 |
| Subject: | Re: Best way to figure out whether a query returns RESULT or NON-RESULT | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-199652@lists.php.net to get a copy of this message | ||
Thanks.
Never knew there existed (===). Silly me :)
Regards,
Karam
--- Marek Kilimajer <lists@kilimajer.net> wrote:
> Karam Chand wrote:
> > Hello,
> >
> > mysql_query() returns non-false even if there was
> an
> > UPDATE statement and the query was successful.
> >
> > But if I put the $result variable in
> mysql_num_rows()
> > it returns an error, $result in invalid handle.
> >
> > I was asking how to know that where its an UPDATE
> > statement so I dont call mysql_num_rows() at all.
>
> I Chris said, if($result === true || $result ===
> false), no rows were
> returned.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com