Page 2 of 2

Posted: Wed Mar 10, 2004 3:45 am
by JayBird
try and and see, i just did and it worked

anyway, thats is the reason you are getting what you are getting.

Mark

Posted: Wed Mar 10, 2004 3:48 am
by malcolmboston
Thanks Bech anyway

im sure your right (you always are) :lol:

still cant believe i missed out

Code: Select all

$result = mysql_query($query)
i really should start sleeping normal hours instead of rushing to get projects finished for clients faster

and im gonna have to try ouy mysql_affected_rows() because i know for a fact in the manual it says it cant be used on SELECT statments

Posted: Wed Mar 10, 2004 3:49 am
by JayBird
It appears that php's "mysql_affected_rows" calls mysql's "mysql_affected_rows"... which says:

"For SELECT statements, mysql_affected_rows() works like mysql_num_rows().
mysql_affected_rows() is currently implemented as a macro."
Mark

Posted: Wed Mar 10, 2004 3:50 am
by malcolmboston
lol, i know you didnt get that from the manual :lol:
from manual wrote: mysql_affected_rows() does not work with SELECT statements; only on statements which modify records. To retrieve the number of rows returned by a SELECT, use mysql_num_rows().
i have tried this before as well and it has never worked for me :?

Posted: Wed Mar 10, 2004 3:52 am
by JayBird
read the user comments, you will find it there.

Mark

Posted: Wed Mar 10, 2004 3:54 am
by malcolmboston
well, isnt that lame..............