Newbie a bit confused. MySQL and select count(*) as something
| From: | Scruffy Dingo | Date: | Wed, 17 May 2000 15:54:47 +0000 |
| Subject: | Newbie a bit confused. MySQL and select count(*) as something | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-38@lists.php.net to get a copy of this message | ||
Where to start...
I have a sql query like this:
$sql_query = "select count(*) as number_of_records from $table where
flag='N'";
...and am a bit confused if "select count(*)" does double duty:
Does "select count(*)" ONLY report the number of records in the table or
does it also report the records that there are as well as the number of
records. - ?
I understand that using the "as" clause in MySQL dynamically creates a new
set of records, or something like that.
Thanks for any info with regards to this. I'm a bit foggy with this SQL
stuff still.