How can we find the number of rows in a result set using PHP?

Answer Posted / rajan vardawaj

Here is how can you find the number of rows in a result set
in PHP: $result = mysql_query($any_valid_sql,
$database_link); $num_rows = mysql_num_rows($result); echo
“$num_rows rows found”;

Is This Answer Correct ?    14 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is config file in php?

534


What are examples of independent and dependent variables?

491


What is difference between session and cookies in php?

476


What is the difference between laravel and php?

498


Are objects passed by value or by reference?

545






How to block direct directory access in PHP?

553


What is the name of the scripting engine that powers PHP?

707


How is it possible to set an infinite execution time for php script?

518


Why should I store logs in a database rather than a file?

534


What is the default session time in php?

527


How error handling is being handled by php?

546


Is age interval or ordinal?

520


Explain what does the unset() function means?

574


What is the use of mvc in php?

511


Tell me how to set a page as a home page in a php based site?

504