Hi all ,

I am using PHP 4.3.2 and MYSQL DB.

I need to compare values in array which populated by database , below is the code :

$temp_tbl = array();
while ($row = $temptbl_result->fetchRow(DB_FETCHMODE_ASSOC)){
          $rs_chasis_serialno = $row['serial_no'];
          $rs_card_serial_no = $row['card_serial_no'];
          $rs_country = $row['country'];
          $status = $row['status'];
          $temp_tbl[] = array("chassis_serial_no"=>$rs_chasis_serialno,
                              "card_serial_no"=>$rs_card_serial_no,
                              "country"=>country
                              "status"=>status);
}

$current_tbl = array();
while ($row = $currenttbl_result->fetchRow(DB_FETCHMODE_ASSOC)){
          $rs_chasis_serialno = $row['serial_no'];
          $rs_card_serial_no = $row['card_serial_no'];
          $rs_country = $row['country'];
          $current_tbl[] = array("chassis_serial_no"=>$rs_chasis_serialno,
                              "card_serial_no"=>$rs_card_serial_no,
                               "country"=>country);
}

--> need to compare $temp_tbl array and $current_tbl array.
--> if values is different between 2 array , need to update the status field in the $temp_tbl array.

Anybody have any suggestion how to do this ?
Thanks

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to