adspace


Which function is used in php to count the total number of rows returned by any query?

Answer Posted / Rajesh Singh

In PHP, you can use the mysqli_num_rows() or pg_num_rows() (for PostgreSQL) functions to count the total number of rows returned by a query. Here's an example:nn```phpn$result = mysqli_query($connection, 'SELECT * FROM table');n$numRows = mysqli_num_rows($result);necho $numRows; // Output: The total number of rows returned by the query.```

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the current stable version of php?

1127


What is difference between static and final in php?

1110


Name and explain five of the PHP error constants?

1039


hello all, I need some sample placement papers in lion bridge.. can anyone help me?

2180


Which variable declarations within a class is invalid in php?

1051


Explain me is it possible to destroy a cookie?

1032


What is trait in php?

1068


How to calculate the difference between two dates using php?

1147


List some features of php that are deprecated in php7?

1025


Write a program using while loop?

1123


if you run the app program all vendor open items are cleared but is it possible to reverse the again again open items please tell me the answer

1995


sort term descripttion form, report and uery

2255


how to detect a mobile device using php

1175


What is the difference between htmlentities() and htmlspecialchars()?

1095


What does $_files means?

1167