please excuse the $sqlHelper syntax.. it is part of the framework to run the queries
[php]
if($sqlHelper->execute())
{
while( $sqlHelper->db->moveNext() )
{
if( $sqlHelper->db->record['fe_only'] == 1 && !file_exists("/images/parts/". strtolower($sqlHelper->db->record['number']) .".jpg") )
{
$hardwareArray[] = array(
'HRDWR_ID' => $sqlHelper->db->record['part_id'],
'HRDWR_NUM' => $sqlHelper->db->record['number'],
'HRDWR_DESC' => str_replace("\n", "<br />", $sqlHelper->db->record['description']),
'HRDWR_NOTES' => $sqlHelper->db->record['notes'],
'HRDWR_QTY' => $sqlHelper->db->record['quantity'],
'HRDWR_UNIT' => $sqlHelper->db->record['unit']
);
}
else
{
$childArray[] = array(
'SUB_ID' => $sqlHelper->db->record['part_id'],
'SUB_NUM' => $sqlHelper->db->record['number'],
'SUB_DESC' => str_replace("\n", "<br />", $sqlHelper->db->record['description']),
'SUB_NOTES' => $sqlHelper->db->record['notes'],
'SUB_QTY' => $sqlHelper->db->record['quantity'],
'SUB_UNIT' => $sqlHelper->db->record['unit'],
'SUB_IMAGE' => strtolower($sqlHelper->db->record['number']),
);
}
}
}
[/php]
this is running the query fine, and it will put all of the sub parts in the array which prints out correctly. my problem is that it doesn't do the separation correctly. The moveNext() is supposed to just get the next row from the database and check once again which array it should be transplanted into, but doesnt... can anyone see where im going wrong?