Only 725 of 753 records being returned by select all??
Moderator: General Moderators
Re: Only 725 of 753 records being returned by select all??
I was running the previous queries from the CLI on a local copy of the DB, so I'm just writing a script to do the same query on the remote copy of the DB. Will just be another couple of minutes. Sorry about the delay.
Re: Only 725 of 753 records being returned by select all??
Ok, I ran that and just got out a list of numbers from 1 to 753 - do you want me to post the numbers? I've gone through them and there's no numbers skipped and no null values. Here's the code I used:
$SQL = "SELECT MemID FROM members";
$result = mysql_query($SQL, $conn) or die(mysql_error());
while($row=mysql_fetch_array($result)){
echo ($row[MemID]."<br>");
}
$SQL = "SELECT MemID FROM members";
$result = mysql_query($SQL, $conn) or die(mysql_error());
while($row=mysql_fetch_array($result)){
echo ($row[MemID]."<br>");
}
Re: Only 725 of 753 records being returned by select all??
Did you try it?VladSun wrote:Just in case - try
[sql]SELECT * FROM members ORDER BY MemID[/sql]
There are 10 types of people in this world, those who understand binary and those who don't
Re: Only 725 of 753 records being returned by select all??
Also, try "SELECT MemID FROM members GROUP BY MemID". That'll give you a clear indication of how many member ids there are, pointing to whether or not there are any duplicate or NULL entries.
Re: Only 725 of 753 records being returned by select all??
VladSun,
I ran that:
SELECT * FROM members ORDER BY MemID;
And got the exact same result set back.
onion2k,
I also ran your query: no duplicates, which is as expected as MemID is the Primary Key.
I ran that:
SELECT * FROM members ORDER BY MemID;
And got the exact same result set back.
onion2k,
I also ran your query: no duplicates, which is as expected as MemID is the Primary Key.