Re: mysql_query returning empty result after DELETE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stan wrote:
OK.

If I change the test to "if(mysql_num_rows($thisRow) < 1)" it does what I
want.

I guess if I want to understand why False was returned originally (just
after I created the database) I need to start over.

According to the docs mysql_query only returns false if there's an error.

Do I have 4 possible conditions here: 1) the mysql_query() function fails
and I get a PHP error, 2) the query fails at the server and I get False, or
3) the query doesn't fail at the server and I get "a result" that a) is
empty, or b) contains 1 or more rows?  Yes.

1) I'm not sure what you mean. If you try to run a query before having a connection (or not checking the connection is valid before running a query), then mysql_query will return false and php will throw warnings or notices (can't remember which).

2) Correct

3) Also correct.

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux