Counting rows equal to something in MySQL
| From: | Matt Greene | Date: | Sun, 12 Dec 1999 05:16:11 +0000 |
| Subject: | Counting rows equal to something in MySQL | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-7805@lists.php.net to get a copy of this message | ||
How can i search through a column in a table and find everything equal to
something and output the number found as a number?
Here is a little snippet of code just for example
$query = "SELECT * FROM $sqltable where some_column = $something_to_equal";
$result = mysql_db_query( "$sqldb", $query, $mysqlconn);