Darkmatter5 Posted October 27, 2008 Share Posted October 27, 2008 I have this query $query=mysql_query("SELECT COUNT(member_id) FROM $dbnameprim.$pagedb WHERE mem_username='$username' OR mem_email='$email' ") or die(mysql_error()); Now how can I use this query to get the value of this query into a variable named $count? BTW if I manually substitute the variables in the query, the query gives me the result I expect. Link to comment https://forums.phpfreaks.com/topic/130299-solved-count-question/ Share on other sites More sharing options...
rhodesa Posted October 27, 2008 Share Posted October 27, 2008 $result=mysql_query("SELECT COUNT(member_id) FROM $dbnameprim.$pagedb WHERE mem_username='$username' OR mem_email='$email' ") or die(mysql_error()); list($count) = mysql_fetch_array($result); echo $count; Link to comment https://forums.phpfreaks.com/topic/130299-solved-count-question/#findComment-675762 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.