
March 22nd, 2008, 05:12 PM
|
|
Registered User
|
|
Join Date: Mar 2008
Posts: 1
Time spent in forums: 9 m 17 sec
Reputation Power: 0
|
|
|
MySQL 5 - Strange issue with basic SELECT
Hi all,
Thanks in advance for any advice. I'm having a strange problem with a simple SELECT query. Basically, I want to retrieve all the entries that have a certain value on a variable. And then I'll do some other operations on them. But the weird thing is that the query is only returning one row, instead of all the rows that match the criteria.
For example:
$result=mysql_query("SELECT email FROM mytable WHERE sent='0'");
This will just return 1 row (running a count on the length of $result verifies this...just 1 entry being returned).
Even if I do a simple SELECT * FROM mytable , only one entry is returned (and yes, there are many many more entries than just 1 in the db).
I'm guessing that I'm doing something completely obvious and stupid, but am somehow overlooking it. Any thoughts would be appreciate...
AK
|