i have 2 tables like this
tbl_inbox
-SenderNumber
-Message
tbl_report
-Number
-Name
-Count
actually i want to show how many times these numbers appear in table count, i have try this code,but didn't show anything.
this my code :
$count = mysql_query("SELECT count(SenderNumber) as num FROM tbl_inbox WHERE SenderNumber = ".$data['Number']"");
$result = mysql_fetch_assoc($count);
$countresult = $result['num'];
正确的SQL:
$count = mysql_query("SELECT count(SenderNumber) as num FROM tbl_inbox WHERE SenderNumber = ".$data['Number']);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.