FIX_CHANGE
This commit is contained in:
parent
a76585137c
commit
0b4ff58661
@ -3436,21 +3436,15 @@ class EmployeeRestController extends AdminController
|
|||||||
if (!empty($client_short_name)) {
|
if (!empty($client_short_name)) {
|
||||||
log_message('error', 'STEP 3: Looking up client with short_name: ' . $client_short_name);
|
log_message('error', 'STEP 3: Looking up client with short_name: ' . $client_short_name);
|
||||||
|
|
||||||
// $client_data = $this->clientModel
|
$client_data = $this->clientModel
|
||||||
// ->where('is_active', 1)
|
->where('is_active', 1)
|
||||||
// ->where('short_name', $client_short_name)
|
->where('short_name', $client_short_name)
|
||||||
// ->first();
|
->first();
|
||||||
|
|
||||||
$sql = "SELECT * FROM clients WHERE is_active = 1 AND short_name = ? LIMIT 1";
|
// $sql = "SELECT * FROM clients WHERE is_active = 1 AND short_name = ? LIMIT 1";
|
||||||
$client_data = db_connect()->query($sql, [$client_short_name])->getRowArray();
|
// $client_data = db_connect()->query($sql, [$client_short_name])->getRowArray();
|
||||||
|
|
||||||
|
if (!empty($client_data)) {
|
||||||
log_message('error', 'STEP 3: Looking up client with short_name: ' . db_connect()->getLastQuery());
|
|
||||||
log_message('error', 'STEP 3: Looking up client with short_name: ' . var_dump($client_data) );
|
|
||||||
log_message('error', 'STEP 3: Looking up client with short_name: ' . is_array($client_data) && count($client_data));
|
|
||||||
log_message('error', 'STEP 3: Looking up client with short_name: ' . json_encode($client_data));
|
|
||||||
|
|
||||||
if (is_array($client_data) && count($client_data)) {
|
|
||||||
$clientId = $client_data['id'];
|
$clientId = $client_data['id'];
|
||||||
log_message('error', 'STEP 4: Found client ID: ' . $clientId);
|
log_message('error', 'STEP 4: Found client ID: ' . $clientId);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user