Originally Posted by
lebrand2006
I would like to ask if there is any way to see a result of a statement before I put it in the code; like :
$wanted_status_num = "select * from " .TABLE_ORDERS_STATUS_HISTORY . "
where orders_id = '" . $orders_id . "'
order by orders_status_id desc limit 1";
Can I see the value witch is assigned to the variable and how ?
After you execute this code, you can simply loop through the results and echo them out...
Code:
$sql = "select * from " .TABLE_ORDERS_STATUS_HISTORY . "
where orders_id = '" . $orders_id . "'
order by orders_status_id desc limit 1";
$wanted_status_num = $db->Execute($sql);
while (!$wanted_status_num->EOF) {
print_r($wanted_status_num->fields);
echo "<br /> \n";
$wanted_status_num->MoveNext();
}
Pay attention to the fact that I renamed the variable on your SQL statement and moved it to the results of that statement.
Bookmarks