php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "SELECT COUNT()"

What is the difference between using SELECT COUNT() and mysql_num_rows() to count records in a table?

The main difference between using SELECT COUNT() and mysql_num_rows() to count records in a table is that SELECT COUNT() directly retrieves the count...

What is the difference between using SELECT * and SELECT COUNT(*) in a MySQL query in PHP?

When using SELECT *, the query will return all columns of the selected rows from the database. On the other hand, when using SELECT COUNT(*), the quer...

Is it more efficient to use SELECT COUNT(*) or SELECT * FROM when counting records in a MySQL table in PHP?

When counting records in a MySQL table in PHP, it is more efficient to use SELECT COUNT(*) rather than SELECT * FROM. This is because SELECT COUNT(*)...

How can the use of COUNT() and SELECT * impact the performance of SQL queries in PHP?

Using COUNT() and SELECT * in SQL queries can impact performance because COUNT() requires the database to scan all rows to count them, which can be re...

What are the advantages of using "SELECT COUNT(*)" instead of "SELECT * FROM table_name" when counting records in a table in PHP?

When counting records in a table in PHP, using "SELECT COUNT(*)" is more efficient than "SELECT * FROM table_name" because it only retrieves the count...

Showing 1 to 5 of 5148 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 1029 1030 ›
PHP.ORG

A free knowledge base for PHP developers. Open to all.

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.