Hi All,
I'm very new to PHP, I'm an ASP guy traditionally.
I have come across a very strange problem when extracting data from a MySQL DB.
It seems to "skip" bits of data. I have used the following code:
echo "Serial Number: $row[SerialNo]
echo "Repair Type: ";
echo DisplayRepairType( $row[Type] );
echo "<br>Product Status: ";
echo DisplayLocation( $row[Location ] );
echo "<br><br>";
result:
Serial Number:
Repair Type:Unknown
Product Status: Requested
Serial Number: XX-XXX-01sd
Repair Type:Unknown
Product Status: Requested
On the first loop through the data, the serial number is omitted, but it appears on all the other entries.
I can change the sort order in the SQL, and the serial numbers displayed change, but the first one is still ommitted.
I'm really puzzled by this and I can see no reason for it not to work.
Anyone ever come across this before?
Thanks
John
I'm very new to PHP, I'm an ASP guy traditionally.
I have come across a very strange problem when extracting data from a MySQL DB.
It seems to "skip" bits of data. I have used the following code:
echo "Serial Number: $row[SerialNo]
echo "Repair Type: ";
echo DisplayRepairType( $row[Type] );
echo "<br>Product Status: ";
echo DisplayLocation( $row[Location ] );
echo "<br><br>";
result:
Serial Number:
Repair Type:Unknown
Product Status: Requested
Serial Number: XX-XXX-01sd
Repair Type:Unknown
Product Status: Requested
On the first loop through the data, the serial number is omitted, but it appears on all the other entries.
I can change the sort order in the SQL, and the serial numbers displayed change, but the first one is still ommitted.
I'm really puzzled by this and I can see no reason for it not to work.
Anyone ever come across this before?
Thanks
John