I have a table where the row named hide can have a value 0 or 1.
I want to obtain a count of all the rows where hide has value 0.
The following works on mysqladmin:
SELECT SUM( hide = 0 ) FROM `names` LIMIT 0, - 1
Giving
SUM( hide = 0 )
7
The PHP script statements generated are:
$sql =
-
From: rentAweek support [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 27, 2003 5:31 PM
Subject: [PHP] Counting table fields having specific values
I have a table where the row named hide can have a value 0 or 1.
I want to obtain a count of all the rows where hide has value
fields having specific values
I have a table where the row named hide can have a value 0 or 1.
I want to obtain a count of all the rows where hide has value 0.
The following works on mysqladmin:
SELECT SUM( hide = 0 ) FROM `names` LIMIT 0, - 1
Giving
SUM( hide = 0 )
7
The PHP
3 matches
Mail list logo