ERROR - 2025-11-05 01:28:04 --> mysqli_sql_exception: Column 'company_id' in WHERE is ambiguous in /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:295
Stack trace:
#0 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php(295): mysqli->query('SELECT `agents`...', 0)
#1 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Database/BaseConnection.php(692): CodeIgniter\Database\MySQLi\Connection->execute('SELECT `agents`...')
#2 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Database/BaseConnection.php(606): CodeIgniter\Database\BaseConnection->simpleQuery('SELECT `agents`...')
#3 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Database/BaseBuilder.php(1616): CodeIgniter\Database\BaseConnection->query('SELECT `agents`...', Array, false)
#4 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Model.php(237): CodeIgniter\Database\BaseBuilder->get()
#5 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/BaseModel.php(624): CodeIgniter\Model->doFindAll(0, 0)
#6 /home/busvalle/data.busvalley.com/busvalley_new/modules/Account/Controllers/Payagent.php(430): CodeIgniter\BaseModel->findAll()
#7 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/CodeIgniter.php(932): Modules\Account\Controllers\Payagent->range()
#8 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/CodeIgniter.php(497): CodeIgniter\CodeIgniter->runController(Object(Modules\Account\Controllers\Payagent))
#9 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/CodeIgniter.php(366): CodeIgniter\CodeIgniter->handleRequest(NULL, Object(Config\Cache), false)
#10 /home/busvalle/data.busvalley.com/busvalley_new/public/index.php(65): CodeIgniter\CodeIgniter->run()
#11 /home/busvalle/data.busvalley.com/busvalley_new/index.php(2): require_once('/home/busvalle/...')
#12 {main}
CRITICAL - 2025-11-05 01:28:04 --> Column 'company_id' in WHERE is ambiguous
in SYSTEMPATH/Database/MySQLi/Connection.php on line 295.
 1 SYSTEMPATH/Database/MySQLi/Connection.php(295): mysqli->query('SELECT `agents`.`id` as `agentId`, `agents`.*, `payagents`.*, `companies`.`name` AS `company_name`, concat(user_details.first_name, " ", user_details.last_name) AS approved_by
FROM `payagents`
LEFT JOIN `agents` ON `agents`.`id` = `payagents`.`agent_id`
LEFT JOIN `companies` ON `companies`.`id` = `payagents`.`company_id`
LEFT JOIN `user_details` ON `user_details`.`user_id` = `payagents`.`approved_id`
WHERE DATE(payagents.created_at) >= \'2025-10-01 00:00:00\'
AND DATE(payagents.created_at) <= \'2025-10-31 00:00:00\'
AND   (
`agent_id` = \'16\'
OR `company_id` = \'3,4,5\'
 )
AND `payagents`.`deleted_at` IS NULL', 0)
 2 SYSTEMPATH/Database/BaseConnection.php(692): CodeIgniter\Database\MySQLi\Connection->execute('SELECT `agents`.`id` as `agentId`, `agents`.*, `payagents`.*, `companies`.`name` AS `company_name`, concat(user_details.first_name, " ", user_details.last_name) AS approved_by
FROM `payagents`
LEFT JOIN `agents` ON `agents`.`id` = `payagents`.`agent_id`
LEFT JOIN `companies` ON `companies`.`id` = `payagents`.`company_id`
LEFT JOIN `user_details` ON `user_details`.`user_id` = `payagents`.`approved_id`
WHERE DATE(payagents.created_at) >= \'2025-10-01 00:00:00\'
AND DATE(payagents.created_at) <= \'2025-10-31 00:00:00\'
AND   (
`agent_id` = \'16\'
OR `company_id` = \'3,4,5\'
 )
AND `payagents`.`deleted_at` IS NULL')
 3 SYSTEMPATH/Database/BaseConnection.php(606): CodeIgniter\Database\BaseConnection->simpleQuery('SELECT `agents`.`id` as `agentId`, `agents`.*, `payagents`.*, `companies`.`name` AS `company_name`, concat(user_details.first_name, " ", user_details.last_name) AS approved_by
FROM `payagents`
LEFT JOIN `agents` ON `agents`.`id` = `payagents`.`agent_id`
LEFT JOIN `companies` ON `companies`.`id` = `payagents`.`company_id`
LEFT JOIN `user_details` ON `user_details`.`user_id` = `payagents`.`approved_id`
WHERE DATE(payagents.created_at) >= \'2025-10-01 00:00:00\'
AND DATE(payagents.created_at) <= \'2025-10-31 00:00:00\'
AND   (
`agent_id` = \'16\'
OR `company_id` = \'3,4,5\'
 )
AND `payagents`.`deleted_at` IS NULL')
 4 SYSTEMPATH/Database/BaseBuilder.php(1616): CodeIgniter\Database\BaseConnection->query('SELECT `agents`.`id` as `agentId`, `agents`.*, `payagents`.*, `companies`.`name` AS `company_name`, concat(user_details.first_name, " ", user_details.last_name) AS approved_by
FROM `payagents`
LEFT JOIN `agents` ON `agents`.`id` = `payagents`.`agent_id`
LEFT JOIN `companies` ON `companies`.`id` = `payagents`.`company_id`
LEFT JOIN `user_details` ON `user_details`.`user_id` = `payagents`.`approved_id`
WHERE DATE(payagents.created_at) >= :DATE(payagents.created_at):
AND DATE(payagents.created_at) <= :DATE(payagents.created_at).1:
AND   (
`agent_id` = :agent_id:
OR `company_id` = :company_id:
 )
AND `payagents`.`deleted_at` IS NULL', [...], false)
 5 SYSTEMPATH/Model.php(237): CodeIgniter\Database\BaseBuilder->get()
 6 SYSTEMPATH/BaseModel.php(624): CodeIgniter\Model->doFindAll(0, 0)
 7 ROOTPATH/modules/Account/Controllers/Payagent.php(430): CodeIgniter\BaseModel->findAll()
 8 SYSTEMPATH/CodeIgniter.php(932): Modules\Account\Controllers\Payagent->range()
 9 SYSTEMPATH/CodeIgniter.php(497): CodeIgniter\CodeIgniter->runController(Object(Modules\Account\Controllers\Payagent))
10 SYSTEMPATH/CodeIgniter.php(366): CodeIgniter\CodeIgniter->handleRequest(null, Object(Config\Cache), false)
11 FCPATH/index.php(65): CodeIgniter\CodeIgniter->run()
12 ROOTPATH/index.php(2): require_once('/home/busvalle/data.busvalley.com/busvalley_new/public/index.php')
ERROR - 2025-11-05 01:56:41 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 01:56:41 --> 
ERROR - 2025-11-05 09:26:32 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 09:26:32 --> 
ERROR - 2025-11-05 10:43:49 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 10:43:49 --> 
ERROR - 2025-11-05 10:47:13 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 10:47:13 --> 
ERROR - 2025-11-05 11:05:26 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 11:05:26 --> 
ERROR - 2025-11-05 11:17:25 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 11:17:25 --> 
ERROR - 2025-11-05 11:30:09 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 11:30:09 --> 
ERROR - 2025-11-05 11:34:08 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 11:34:08 --> 
ERROR - 2025-11-05 12:33:00 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 12:33:00 --> 
ERROR - 2025-11-05 12:34:38 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 12:34:38 --> 
ERROR - 2025-11-05 12:39:07 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 12:39:07 --> 
ERROR - 2025-11-05 12:44:04 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 12:44:04 --> 
ERROR - 2025-11-05 12:55:01 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 12:55:01 --> 
ERROR - 2025-11-05 13:03:13 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 13:03:13 --> 
ERROR - 2025-11-05 13:09:20 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 13:09:20 --> 
CRITICAL - 2025-11-05 13:27:47 --> unlink(/home/busvalle/data.busvalley.com/busvalley_new/writable/debugbar/debugbar_1762341124.579348.json): No such file or directory
in SYSTEMPATH/Debug/Toolbar/Collectors/History.php on line 78.
 1 [internal function]: CodeIgniter\Debug\Exceptions->errorHandler(2, 'unlink(/home/busvalle/data.busvalley.com/busvalley_new/writable/debugbar/debugbar_1762341124.579348.json): No such file or directory', '/home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Debug/Toolbar/Collectors/History.php', 78, [...])
 2 SYSTEMPATH/Debug/Toolbar/Collectors/History.php(78): unlink('/home/busvalle/data.busvalley.com/busvalley_new/writable/debugbar/debugbar_1762341124.579348.json')
 3 SYSTEMPATH/Debug/Toolbar.php(502): CodeIgniter\Debug\Toolbar\Collectors\History->setFiles('1762342064.508482', 20)
 4 SYSTEMPATH/Debug/Toolbar.php(479): CodeIgniter\Debug\Toolbar->format([...], 'html')
 5 APPPATH/Config/Events.php(52): CodeIgniter\Debug\Toolbar->respond()
 6 SYSTEMPATH/Events/Events.php(152): CodeIgniter\Events\Events::Config\{closure}()
 7 SYSTEMPATH/CodeIgniter.php(348): CodeIgniter\Events\Events::trigger('pre_system')
 8 FCPATH/index.php(65): CodeIgniter\CodeIgniter->run()
 9 ROOTPATH/index.php(2): require_once('/home/busvalle/data.busvalley.com/busvalley_new/public/index.php')
ERROR - 2025-11-05 13:37:21 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 13:37:21 --> 
ERROR - 2025-11-05 13:53:10 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 13:53:10 --> 
ERROR - 2025-11-05 14:26:50 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 14:26:50 --> 
ERROR - 2025-11-05 14:42:55 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 14:42:55 --> 
ERROR - 2025-11-05 14:50:09 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 14:50:09 --> 
ERROR - 2025-11-05 15:31:29 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 15:31:29 --> 
ERROR - 2025-11-05 15:43:49 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 15:43:49 --> 
ERROR - 2025-11-05 16:13:45 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 16:13:45 --> 
ERROR - 2025-11-05 16:49:24 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 16:49:24 --> 
ERROR - 2025-11-05 17:17:42 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 17:17:42 --> 
ERROR - 2025-11-05 17:30:13 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 17:30:13 --> 
ERROR - 2025-11-05 17:46:52 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 17:46:52 --> 
ERROR - 2025-11-05 17:49:12 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 17:49:12 --> 
ERROR - 2025-11-05 17:56:53 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 17:56:53 --> 
ERROR - 2025-11-05 18:51:51 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 18:51:51 --> 
ERROR - 2025-11-05 19:26:06 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 19:26:06 --> 
ERROR - 2025-11-05 19:48:47 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 19:48:47 --> 
ERROR - 2025-11-05 20:38:23 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 20:38:23 --> 
ERROR - 2025-11-05 20:39:04 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 20:39:04 --> 
ERROR - 2025-11-05 20:41:05 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 20:41:05 --> 
ERROR - 2025-11-05 20:52:37 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 20:52:37 --> 
ERROR - 2025-11-05 21:11:48 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 21:11:48 --> 
ERROR - 2025-11-05 21:17:14 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 21:17:14 --> 
ERROR - 2025-11-05 21:57:34 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 21:57:34 --> 
ERROR - 2025-11-05 22:38:29 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 22:38:29 --> 
ERROR - 2025-11-05 22:40:51 --> Email: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
ERROR - 2025-11-05 22:40:51 --> 
ERROR - 2025-11-05 23:47:44 --> mysqli_sql_exception: Column 'company_id' in WHERE is ambiguous in /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:295
Stack trace:
#0 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php(295): mysqli->query('SELECT `agents`...', 0)
#1 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Database/BaseConnection.php(692): CodeIgniter\Database\MySQLi\Connection->execute('SELECT `agents`...')
#2 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Database/BaseConnection.php(606): CodeIgniter\Database\BaseConnection->simpleQuery('SELECT `agents`...')
#3 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Database/BaseBuilder.php(1616): CodeIgniter\Database\BaseConnection->query('SELECT `agents`...', Array, false)
#4 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Model.php(237): CodeIgniter\Database\BaseBuilder->get()
#5 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/BaseModel.php(624): CodeIgniter\Model->doFindAll(0, 0)
#6 /home/busvalle/data.busvalley.com/busvalley_new/modules/Account/Controllers/Payagent.php(430): CodeIgniter\BaseModel->findAll()
#7 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/CodeIgniter.php(932): Modules\Account\Controllers\Payagent->range()
#8 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/CodeIgniter.php(497): CodeIgniter\CodeIgniter->runController(Object(Modules\Account\Controllers\Payagent))
#9 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/CodeIgniter.php(366): CodeIgniter\CodeIgniter->handleRequest(NULL, Object(Config\Cache), false)
#10 /home/busvalle/data.busvalley.com/busvalley_new/public/index.php(65): CodeIgniter\CodeIgniter->run()
#11 /home/busvalle/data.busvalley.com/busvalley_new/index.php(2): require_once('/home/busvalle/...')
#12 {main}
CRITICAL - 2025-11-05 23:47:44 --> Column 'company_id' in WHERE is ambiguous
in SYSTEMPATH/Database/MySQLi/Connection.php on line 295.
 1 SYSTEMPATH/Database/MySQLi/Connection.php(295): mysqli->query('SELECT `agents`.`id` as `agentId`, `agents`.*, `payagents`.*, `companies`.`name` AS `company_name`, concat(user_details.first_name, " ", user_details.last_name) AS approved_by
FROM `payagents`
LEFT JOIN `agents` ON `agents`.`id` = `payagents`.`agent_id`
LEFT JOIN `companies` ON `companies`.`id` = `payagents`.`company_id`
LEFT JOIN `user_details` ON `user_details`.`user_id` = `payagents`.`approved_id`
WHERE DATE(payagents.created_at) >= \'2025-10-01 00:00:00\'
AND DATE(payagents.created_at) <= \'2025-10-31 00:00:00\'
AND   (
`agent_id` = \'16\'
OR `company_id` = \'3,4,5\'
 )
AND `payagents`.`deleted_at` IS NULL', 0)
 2 SYSTEMPATH/Database/BaseConnection.php(692): CodeIgniter\Database\MySQLi\Connection->execute('SELECT `agents`.`id` as `agentId`, `agents`.*, `payagents`.*, `companies`.`name` AS `company_name`, concat(user_details.first_name, " ", user_details.last_name) AS approved_by
FROM `payagents`
LEFT JOIN `agents` ON `agents`.`id` = `payagents`.`agent_id`
LEFT JOIN `companies` ON `companies`.`id` = `payagents`.`company_id`
LEFT JOIN `user_details` ON `user_details`.`user_id` = `payagents`.`approved_id`
WHERE DATE(payagents.created_at) >= \'2025-10-01 00:00:00\'
AND DATE(payagents.created_at) <= \'2025-10-31 00:00:00\'
AND   (
`agent_id` = \'16\'
OR `company_id` = \'3,4,5\'
 )
AND `payagents`.`deleted_at` IS NULL')
 3 SYSTEMPATH/Database/BaseConnection.php(606): CodeIgniter\Database\BaseConnection->simpleQuery('SELECT `agents`.`id` as `agentId`, `agents`.*, `payagents`.*, `companies`.`name` AS `company_name`, concat(user_details.first_name, " ", user_details.last_name) AS approved_by
FROM `payagents`
LEFT JOIN `agents` ON `agents`.`id` = `payagents`.`agent_id`
LEFT JOIN `companies` ON `companies`.`id` = `payagents`.`company_id`
LEFT JOIN `user_details` ON `user_details`.`user_id` = `payagents`.`approved_id`
WHERE DATE(payagents.created_at) >= \'2025-10-01 00:00:00\'
AND DATE(payagents.created_at) <= \'2025-10-31 00:00:00\'
AND   (
`agent_id` = \'16\'
OR `company_id` = \'3,4,5\'
 )
AND `payagents`.`deleted_at` IS NULL')
 4 SYSTEMPATH/Database/BaseBuilder.php(1616): CodeIgniter\Database\BaseConnection->query('SELECT `agents`.`id` as `agentId`, `agents`.*, `payagents`.*, `companies`.`name` AS `company_name`, concat(user_details.first_name, " ", user_details.last_name) AS approved_by
FROM `payagents`
LEFT JOIN `agents` ON `agents`.`id` = `payagents`.`agent_id`
LEFT JOIN `companies` ON `companies`.`id` = `payagents`.`company_id`
LEFT JOIN `user_details` ON `user_details`.`user_id` = `payagents`.`approved_id`
WHERE DATE(payagents.created_at) >= :DATE(payagents.created_at):
AND DATE(payagents.created_at) <= :DATE(payagents.created_at).1:
AND   (
`agent_id` = :agent_id:
OR `company_id` = :company_id:
 )
AND `payagents`.`deleted_at` IS NULL', [...], false)
 5 SYSTEMPATH/Model.php(237): CodeIgniter\Database\BaseBuilder->get()
 6 SYSTEMPATH/BaseModel.php(624): CodeIgniter\Model->doFindAll(0, 0)
 7 ROOTPATH/modules/Account/Controllers/Payagent.php(430): CodeIgniter\BaseModel->findAll()
 8 SYSTEMPATH/CodeIgniter.php(932): Modules\Account\Controllers\Payagent->range()
 9 SYSTEMPATH/CodeIgniter.php(497): CodeIgniter\CodeIgniter->runController(Object(Modules\Account\Controllers\Payagent))
10 SYSTEMPATH/CodeIgniter.php(366): CodeIgniter\CodeIgniter->handleRequest(null, Object(Config\Cache), false)
11 FCPATH/index.php(65): CodeIgniter\CodeIgniter->run()
12 ROOTPATH/index.php(2): require_once('/home/busvalle/data.busvalley.com/busvalley_new/public/index.php')
ERROR - 2025-11-05 23:48:32 --> mysqli_sql_exception: Column 'company_id' in WHERE is ambiguous in /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php:295
Stack trace:
#0 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php(295): mysqli->query('SELECT `agents`...', 0)
#1 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Database/BaseConnection.php(692): CodeIgniter\Database\MySQLi\Connection->execute('SELECT `agents`...')
#2 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Database/BaseConnection.php(606): CodeIgniter\Database\BaseConnection->simpleQuery('SELECT `agents`...')
#3 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Database/BaseBuilder.php(1616): CodeIgniter\Database\BaseConnection->query('SELECT `agents`...', Array, false)
#4 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/Model.php(237): CodeIgniter\Database\BaseBuilder->get()
#5 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/BaseModel.php(624): CodeIgniter\Model->doFindAll(0, 0)
#6 /home/busvalle/data.busvalley.com/busvalley_new/modules/Account/Controllers/Payagent.php(430): CodeIgniter\BaseModel->findAll()
#7 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/CodeIgniter.php(932): Modules\Account\Controllers\Payagent->range()
#8 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/CodeIgniter.php(497): CodeIgniter\CodeIgniter->runController(Object(Modules\Account\Controllers\Payagent))
#9 /home/busvalle/data.busvalley.com/busvalley_new/vendor/codeigniter4/framework/system/CodeIgniter.php(366): CodeIgniter\CodeIgniter->handleRequest(NULL, Object(Config\Cache), false)
#10 /home/busvalle/data.busvalley.com/busvalley_new/public/index.php(65): CodeIgniter\CodeIgniter->run()
#11 /home/busvalle/data.busvalley.com/busvalley_new/index.php(2): require_once('/home/busvalle/...')
#12 {main}
CRITICAL - 2025-11-05 23:48:32 --> Column 'company_id' in WHERE is ambiguous
in SYSTEMPATH/Database/MySQLi/Connection.php on line 295.
 1 SYSTEMPATH/Database/MySQLi/Connection.php(295): mysqli->query('SELECT `agents`.`id` as `agentId`, `agents`.*, `payagents`.*, `companies`.`name` AS `company_name`, concat(user_details.first_name, " ", user_details.last_name) AS approved_by
FROM `payagents`
LEFT JOIN `agents` ON `agents`.`id` = `payagents`.`agent_id`
LEFT JOIN `companies` ON `companies`.`id` = `payagents`.`company_id`
LEFT JOIN `user_details` ON `user_details`.`user_id` = `payagents`.`approved_id`
WHERE DATE(payagents.created_at) >= \'2025-10-01 00:00:00\'
AND DATE(payagents.created_at) <= \'2025-10-31 00:00:00\'
AND   (
`agent_id` = \'16\'
OR `company_id` = \'3,4,5\'
 )
AND `payagents`.`deleted_at` IS NULL', 0)
 2 SYSTEMPATH/Database/BaseConnection.php(692): CodeIgniter\Database\MySQLi\Connection->execute('SELECT `agents`.`id` as `agentId`, `agents`.*, `payagents`.*, `companies`.`name` AS `company_name`, concat(user_details.first_name, " ", user_details.last_name) AS approved_by
FROM `payagents`
LEFT JOIN `agents` ON `agents`.`id` = `payagents`.`agent_id`
LEFT JOIN `companies` ON `companies`.`id` = `payagents`.`company_id`
LEFT JOIN `user_details` ON `user_details`.`user_id` = `payagents`.`approved_id`
WHERE DATE(payagents.created_at) >= \'2025-10-01 00:00:00\'
AND DATE(payagents.created_at) <= \'2025-10-31 00:00:00\'
AND   (
`agent_id` = \'16\'
OR `company_id` = \'3,4,5\'
 )
AND `payagents`.`deleted_at` IS NULL')
 3 SYSTEMPATH/Database/BaseConnection.php(606): CodeIgniter\Database\BaseConnection->simpleQuery('SELECT `agents`.`id` as `agentId`, `agents`.*, `payagents`.*, `companies`.`name` AS `company_name`, concat(user_details.first_name, " ", user_details.last_name) AS approved_by
FROM `payagents`
LEFT JOIN `agents` ON `agents`.`id` = `payagents`.`agent_id`
LEFT JOIN `companies` ON `companies`.`id` = `payagents`.`company_id`
LEFT JOIN `user_details` ON `user_details`.`user_id` = `payagents`.`approved_id`
WHERE DATE(payagents.created_at) >= \'2025-10-01 00:00:00\'
AND DATE(payagents.created_at) <= \'2025-10-31 00:00:00\'
AND   (
`agent_id` = \'16\'
OR `company_id` = \'3,4,5\'
 )
AND `payagents`.`deleted_at` IS NULL')
 4 SYSTEMPATH/Database/BaseBuilder.php(1616): CodeIgniter\Database\BaseConnection->query('SELECT `agents`.`id` as `agentId`, `agents`.*, `payagents`.*, `companies`.`name` AS `company_name`, concat(user_details.first_name, " ", user_details.last_name) AS approved_by
FROM `payagents`
LEFT JOIN `agents` ON `agents`.`id` = `payagents`.`agent_id`
LEFT JOIN `companies` ON `companies`.`id` = `payagents`.`company_id`
LEFT JOIN `user_details` ON `user_details`.`user_id` = `payagents`.`approved_id`
WHERE DATE(payagents.created_at) >= :DATE(payagents.created_at):
AND DATE(payagents.created_at) <= :DATE(payagents.created_at).1:
AND   (
`agent_id` = :agent_id:
OR `company_id` = :company_id:
 )
AND `payagents`.`deleted_at` IS NULL', [...], false)
 5 SYSTEMPATH/Model.php(237): CodeIgniter\Database\BaseBuilder->get()
 6 SYSTEMPATH/BaseModel.php(624): CodeIgniter\Model->doFindAll(0, 0)
 7 ROOTPATH/modules/Account/Controllers/Payagent.php(430): CodeIgniter\BaseModel->findAll()
 8 SYSTEMPATH/CodeIgniter.php(932): Modules\Account\Controllers\Payagent->range()
 9 SYSTEMPATH/CodeIgniter.php(497): CodeIgniter\CodeIgniter->runController(Object(Modules\Account\Controllers\Payagent))
10 SYSTEMPATH/CodeIgniter.php(366): CodeIgniter\CodeIgniter->handleRequest(null, Object(Config\Cache), false)
11 FCPATH/index.php(65): CodeIgniter\CodeIgniter->run()
12 ROOTPATH/index.php(2): require_once('/home/busvalle/data.busvalley.com/busvalley_new/public/index.php')
