|
@@ -287,7 +287,8 @@ class Common extends CI_Controller {
|
|
|
if ($address === '' || $address === null){
|
|
|
$id = 0;
|
|
|
}else{
|
|
|
- $res = $this->db->query('select id,name,no from company where companyId like "'.$id.'%" order by id desc')->row_array();
|
|
|
+ $companyId = substr($address,0,2);
|
|
|
+ $res = $this->db->query('select id,name,no from company where companyId like "'.$companyId.'%" order by id desc')->row_array();
|
|
|
if (empty($res) || empty($res['id'])) {
|
|
|
$id = 0;
|
|
|
}else{
|