eva0212
Programmer
- Jun 30, 2008
- 8
Hi,
I have a problem that in looping of two queries.
My code as below:
<?
$queryWorkOrderStatus = "SELECT * FROM " . $table['work_order'] ." WHERE
lower(workOder_status) LIKE LOWER('%" . $keyword . "%') AND site_pkid = $filterId";
$resultsWorkOrderStatus = $database->query($queryWorkOrderStatus);
$results_WorkOrderStatus = $resultsWorkOrderStatus->fetchRow();
while($results_WorkOrderStatus = $resultsWorkOrderStatus->fetchRow()){
$query = "SELECT * FROM " . $table['work_request'] ." WHERE pkid = ".$results_WorkOrderStatus[request_pkid]." AND site_pkid = $filterId";
?>
Suppose after select $queryWorkOrderStatus , that might have few record.
Then running the $query just will get one of the pkid only.
What should i add and what the mistake of my code.
Thanks.
I have a problem that in looping of two queries.
My code as below:
<?
$queryWorkOrderStatus = "SELECT * FROM " . $table['work_order'] ." WHERE
lower(workOder_status) LIKE LOWER('%" . $keyword . "%') AND site_pkid = $filterId";
$resultsWorkOrderStatus = $database->query($queryWorkOrderStatus);
$results_WorkOrderStatus = $resultsWorkOrderStatus->fetchRow();
while($results_WorkOrderStatus = $resultsWorkOrderStatus->fetchRow()){
$query = "SELECT * FROM " . $table['work_request'] ." WHERE pkid = ".$results_WorkOrderStatus[request_pkid]." AND site_pkid = $filterId";
?>
Suppose after select $queryWorkOrderStatus , that might have few record.
Then running the $query just will get one of the pkid only.
What should i add and what the mistake of my code.
Thanks.