mysql_num_rows returns 0, but the same query in phpMyAdmin return results

psyshit

New Member
We have been working for a few hours on a serious problem.We have the following code:\[code\]mysql_connect("localhost","xxx","xxx") or die(mysql_error());mysql_select_db("xxxe");$q = "SELECT m.id, m.expired_date, u.email FROM jos_osemsc_member m, jos_osemsc_orders o, jos_users u WHERE o.order_id = $orderID AND m.member_id = o.user_id AND u.id = o.user_id";$res = mysql_query($q);if (!$res) { mail('[email protected]','test',mysql_error());}mail("[email protected]", "count", mysql_num_rows($res));\[/code\]We receive the "count" mail, but with "0" for result of mysql_num_rows. If we send the query ($q) by e-mail, and execute it in phpMyAdmin, it works and we get one row resulted...Any ideas ?Thanks for the help which will be VERY apperciated
 
Back
Top