Here's my code:
$result = mysql_db_query($database, "SELECT * FROM calendar_messages") or die (mysql_error());
$qry = mysql_fetch_array($result);
while ($qry = mysql_fetch_array($result)) {
//Do Stuff Here
}
I've used this code tons of other times, but on this query it doesn't return all rows. It always leaves out the newest inserted row. So, if there's 5 rows, it only displays 4 rows. If there's 3 rows, it only displays 2. Oddly, the rows it displays change based on how I order my results in the mySQL query, but it never shows all rows in the DB.
Any ideas here? This is an old calendar script (literally written 8-9 years ago) that I'm modifying, so maybe there's a strange DB oddity I don't know about lurking in my DB? I use phpMySQL if that helps.
Please help, this is driving me nuts!