Like I said I can’t count the results returned by mysql_fetch_row:
while ($a = mysql_fetch_row($sql)) {
$result = count($a);
echo $result;
}
It’s returns (1) only why?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Counting a single row (most propably contaning a single field) will return 1 – as it should. Look at
mysql_num_rows()if you want the rowcount before fetching the result, or – if you want to follow up on your own approach – do something like