At 9:27 +0100 7/29/03, Peter Lovatt wrote:
SELECT * FROM TABLE

That will perform a complete table scan and transfer the entire contents of the table over the network. Much better to run

SELECT COUNT(*) FROM tbl_name

Which will be very quick (for MyISAM tables, at least), and in all
cases will return a single row containing one value over the network.


if( mysql_num_rows() == 0) table is empty


HTH

Peter

-----Original Message-----
From: D. K. [mailto:[EMAIL PROTECTED]
Sent: 29 July 2003 08:12
To: [EMAIL PROTECTED]
Subject: <no subject>


Hello List; I am developing a php-mysql application for my term project at school and this is where i seem to not going any further. I need to display alll tables that are holding records, so the user can make detailed selection over these tables.Since this is a student-grade database, there are tables for classes that have not been entered any grades yet. At that point i need to determine if a table is empty and avoid displaying it as a selection choice. Is there a way to do it,to check for an empty set? Thanks in advance. Devrim


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

Are you MySQL certified? http://www.mysql.com/certification/


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to