zoliky
07-24-06, 04:13 AM
I have the following query:
$query = mysql_query("SELECT COUNT(*) FROM messages, register WHERE messages.uid='2' AND messages.send_date > register.last_visit AND register.user_id = messages.uid") or die(mysql_error());
This query show in Phpmyadmin a row titled COUNT(*) :
COUNT( * )
------------
4
I want to assign the value (4) to a variable
Any idea how to read the value?
Thanks
$query = mysql_query("SELECT COUNT(*) FROM messages, register WHERE messages.uid='2' AND messages.send_date > register.last_visit AND register.user_id = messages.uid") or die(mysql_error());
This query show in Phpmyadmin a row titled COUNT(*) :
COUNT( * )
------------
4
I want to assign the value (4) to a variable
Any idea how to read the value?
Thanks