Hello PHP Peoples! I'm having a bit of a problem, probably simple, but I can't seem to find any info on how to fix it. PHP version is 4.4.7 and MySQL version is 4.0.27.
So here's the problem. Let's say I have 12 rows of data when I grab the rows from the DB with this code:
The column "field_id2" is the primary key. Rows 10, 11, and 12 are displayed right after Row 1 instead of Row 9. I've only been working with PHP for about five years but I've made some pretty large scheduling programs and such and I've never encountered this before. Any ideas?
I have been experimenting with this and have discovered that when I create a record with a 20-29 for the "field_id2" value that then displays after row 2.
So here's the problem. Let's say I have 12 rows of data when I grab the rows from the DB with this code:
Code:
$sql = "select * from infop2 order by field_id2";
$result = mysql_query($sql,$connection);
$rows = mysql_num_rows($result);
for ($r = 1; $r <= $rows; $r++) {
$row = mysql_fetch_array($result);
extract($row);
I have been experimenting with this and have discovered that when I create a record with a 20-29 for the "field_id2" value that then displays after row 2.
Comment