I have an issue with an insert statement not producing what I think it should produce...
Here are the relevant parts of the code:
$free_pos[0][0] = $free_pos[1][0] = $left_top = $row[0];// value is 10000002
$free_pos[0][1] = $free_pos[1][1] = $left_step = $row[1];// value is 1
$free_pos[2][0] = $free_pos[3][0] = $right_top = $row[0];// value is 10000003
$free_pos[2][1] = $free_pos[3][1] = $right_step = $row[1];// value is 1
$next_element = 0 ;
$max_element = 3 ;
while ( $next_element <= $max_element ) {
$sql_i="INSERT INTO position_table VALUES ('', '$free_pos[$next_element][0]', '$free_pos[$next_element][1]', '', now(), now(), 'M')" ;
}
The value of the first insert statement should be:
INSERT INTO position_table VALUES ('', '10000002', '1', '', now(), now(), 'M')
But what it is when it is run is this:
INSERT INTO position_table VALUES ('', 'Array[0]', 'Array[1]', '', now(), now(), 'M')
Any suggestions on what I'm doing wrong?
Your help would be greatly appreciated.
Douglas