I have a problem with MySQL in that when I perform the following:
$sqlquery3 = "select sub_no,sub_name from proj_sub where project_number='$project_number' ORDER BY sub_no;";
$result3 = mysql_query($sqlquery3);
while($row3 = mysql_fetch_array($result3))
{
$sqlquery4 = "INSERT INTO sub_image_issue
VALUES(
'',
'$issue',
'$row3[sub_no]',
'$project_number',
''
);";
$results4 = mysql_query($sqlquery4);
}
The second query 'sqlquery4' inputs data into the table 'sub_image_issue' in a bizarre order and not in the order specified in the query '$sqlquery3'
Any ideas why this might be happening? Thomas Shearer
Multimedia Developer
$sqlquery3 = "select sub_no,sub_name from proj_sub where project_number='$project_number' ORDER BY sub_no;";
$result3 = mysql_query($sqlquery3);
while($row3 = mysql_fetch_array($result3))
{
$sqlquery4 = "INSERT INTO sub_image_issue
VALUES(
'',
'$issue',
'$row3[sub_no]',
'$project_number',
''
);";
$results4 = mysql_query($sqlquery4);
}
The second query 'sqlquery4' inputs data into the table 'sub_image_issue' in a bizarre order and not in the order specified in the query '$sqlquery3'
Any ideas why this might be happening? Thomas Shearer
Multimedia Developer