=== Test Ticket Generator === Event: Mohamed Abdo New Years Celebration 2025 (ID: 1) SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' in 'WHERE' (SQL: select * from `seats` where `event_id` = 1 and `status` = available limit 12) (500 Internal Server Error)

Symfony Exception

PDOException QueryException

HTTP 500 Internal Server Error

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' in 'WHERE' (SQL: select * from `seats` where `event_id` = 1 and `status` = available limit 12)

Exceptions 2

Illuminate\Database\ QueryException

Show exception properties
Illuminate\Database\QueryException {#2036
  +errorInfo: array:3 [
    0 => "42S22"
    1 => 1054
    2 => "Unknown column 'status' in 'WHERE'"
  ]
  #sql: "select * from `seats` where `event_id` = ? and `status` = ? limit 12"
  #bindings: array:2 [
    0 => 1
    1 => "available"
  ]
}
  1.         // If an exception occurs when attempting to run a query, we'll format the error
  2.         // message to include the bindings with SQL, which will make this exception a
  3.         // lot more helpful to the developer instead of just the database's errors.
  4.         catch (Exception $e) {
  5.             throw new QueryException(
  6.                 $query$this->prepareBindings($bindings), $e
  7.             );
  8.         }
  9.     }
  1.         // Here we will run this query. If an exception occurs we'll determine if it was
  2.         // caused by a connection that has been lost. If that is the cause, we'll try
  3.         // to re-establish connection and re-run the query with a fresh connection.
  4.         try {
  5.             $result $this->runQueryCallback($query$bindings$callback);
  6.         } catch (QueryException $e) {
  7.             $result $this->handleQueryException(
  8.                 $e$query$bindings$callback
  9.             );
  10.         }
  1.      * @param  bool  $useReadPdo
  2.      * @return array
  3.      */
  4.     public function select($query$bindings = [], $useReadPdo true)
  5.     {
  6.         return $this->run($query$bindings, function ($query$bindings) use ($useReadPdo) {
  7.             if ($this->pretending()) {
  8.                 return [];
  9.             }
  10.             // For select statements, we'll simply execute the query and return an array
  1.      *
  2.      * @return array
  3.      */
  4.     protected function runSelect()
  5.     {
  6.         return $this->connection->select(
  7.             $this->toSql(), $this->getBindings(), ! $this->useWritePdo
  8.         );
  9.     }
  10.     /**
  1.      * @return \Illuminate\Support\Collection
  2.      */
  3.     public function get($columns = ['*'])
  4.     {
  5.         return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  6.             return $this->processor->processSelect($this$this->runSelect());
  7.         }));
  8.     }
  9.     /**
  10.      * Run the query as a "select" statement against the connection.
  1.         if (is_null($original)) {
  2.             $this->columns $columns;
  3.         }
  4.         $result $callback();
  5.         $this->columns $original;
  6.         return $result;
  7.     }
  1.      * @param  array|string  $columns
  2.      * @return \Illuminate\Support\Collection
  3.      */
  4.     public function get($columns = ['*'])
  5.     {
  6.         return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  7.             return $this->processor->processSelect($this$this->runSelect());
  8.         }));
  9.     }
  10.     /**
  1.      * @return \Illuminate\Database\Eloquent\Model[]|static[]
  2.      */
  3.     public function getModels($columns = ['*'])
  4.     {
  5.         return $this->model->hydrate(
  6.             $this->query->get($columns)->all()
  7.         )->all();
  8.     }
  9.     /**
  10.      * Eager load the relationships for the models.
  1.         $builder $this->applyScopes();
  2.         // If we actually found models we will also eager load any relationships that
  3.         // have been specified as needing to be eager loaded, which will solve the
  4.         // n+1 query issue for the developers to avoid running a lot of queries.
  5.         if (count($models $builder->getModels($columns)) > 0) {
  6.             $models $builder->eagerLoadRelations($models);
  7.         }
  8.         return $builder->getModel()->newCollection($models);
  9.     }
  1. // Get available seats
  2. $availableSeats Seat::where('event_id'$eventId)
  3.     ->where('status''available')
  4.     ->take($numOrders $ticketsPerOrder)
  5.     ->get();
  6. if ($availableSeats->count() < $numOrders $ticketsPerOrder) {
  7.     echo "Warning: Only {$availableSeats->count()} seats available, adjusting...\n";
  8.     $numOrders floor($availableSeats->count() / $ticketsPerOrder);
  9.     if ($numOrders 1) {

PDOException

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' in 'WHERE'

  1.             // For select statements, we'll simply execute the query and return an array
  2.             // of the database result set. Each element in the array will be a single
  3.             // row from the database table, and will either be an array or objects.
  4.             $statement $this->prepared(
  5.                 $this->getPdoForSelect($useReadPdo)->prepare($query)
  6.             );
  7.             $this->bindValues($statement$this->prepareBindings($bindings));
  8.             $statement->execute();
  1.             // For select statements, we'll simply execute the query and return an array
  2.             // of the database result set. Each element in the array will be a single
  3.             // row from the database table, and will either be an array or objects.
  4.             $statement $this->prepared(
  5.                 $this->getPdoForSelect($useReadPdo)->prepare($query)
  6.             );
  7.             $this->bindValues($statement$this->prepareBindings($bindings));
  8.             $statement->execute();
  1.     {
  2.         // To execute the statement, we'll simply call the callback, which will actually
  3.         // run the SQL against the PDO connection. Then we can calculate the time it
  4.         // took to execute and log the query SQL, bindings and time in our memory.
  5.         try {
  6.             return $callback($query$bindings);
  7.         }
  8.         // If an exception occurs when attempting to run a query, we'll format the error
  9.         // message to include the bindings with SQL, which will make this exception a
  10.         // lot more helpful to the developer instead of just the database's errors.
  1.         // Here we will run this query. If an exception occurs we'll determine if it was
  2.         // caused by a connection that has been lost. If that is the cause, we'll try
  3.         // to re-establish connection and re-run the query with a fresh connection.
  4.         try {
  5.             $result $this->runQueryCallback($query$bindings$callback);
  6.         } catch (QueryException $e) {
  7.             $result $this->handleQueryException(
  8.                 $e$query$bindings$callback
  9.             );
  10.         }
  1.      * @param  bool  $useReadPdo
  2.      * @return array
  3.      */
  4.     public function select($query$bindings = [], $useReadPdo true)
  5.     {
  6.         return $this->run($query$bindings, function ($query$bindings) use ($useReadPdo) {
  7.             if ($this->pretending()) {
  8.                 return [];
  9.             }
  10.             // For select statements, we'll simply execute the query and return an array
  1.      *
  2.      * @return array
  3.      */
  4.     protected function runSelect()
  5.     {
  6.         return $this->connection->select(
  7.             $this->toSql(), $this->getBindings(), ! $this->useWritePdo
  8.         );
  9.     }
  10.     /**
  1.      * @return \Illuminate\Support\Collection
  2.      */
  3.     public function get($columns = ['*'])
  4.     {
  5.         return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  6.             return $this->processor->processSelect($this$this->runSelect());
  7.         }));
  8.     }
  9.     /**
  10.      * Run the query as a "select" statement against the connection.
  1.         if (is_null($original)) {
  2.             $this->columns $columns;
  3.         }
  4.         $result $callback();
  5.         $this->columns $original;
  6.         return $result;
  7.     }
  1.      * @param  array|string  $columns
  2.      * @return \Illuminate\Support\Collection
  3.      */
  4.     public function get($columns = ['*'])
  5.     {
  6.         return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  7.             return $this->processor->processSelect($this$this->runSelect());
  8.         }));
  9.     }
  10.     /**
  1.      * @return \Illuminate\Database\Eloquent\Model[]|static[]
  2.      */
  3.     public function getModels($columns = ['*'])
  4.     {
  5.         return $this->model->hydrate(
  6.             $this->query->get($columns)->all()
  7.         )->all();
  8.     }
  9.     /**
  10.      * Eager load the relationships for the models.
  1.         $builder $this->applyScopes();
  2.         // If we actually found models we will also eager load any relationships that
  3.         // have been specified as needing to be eager loaded, which will solve the
  4.         // n+1 query issue for the developers to avoid running a lot of queries.
  5.         if (count($models $builder->getModels($columns)) > 0) {
  6.             $models $builder->eagerLoadRelations($models);
  7.         }
  8.         return $builder->getModel()->newCollection($models);
  9.     }
  1. // Get available seats
  2. $availableSeats Seat::where('event_id'$eventId)
  3.     ->where('status''available')
  4.     ->take($numOrders $ticketsPerOrder)
  5.     ->get();
  6. if ($availableSeats->count() < $numOrders $ticketsPerOrder) {
  7.     echo "Warning: Only {$availableSeats->count()} seats available, adjusting...\n";
  8.     $numOrders floor($availableSeats->count() / $ticketsPerOrder);
  9.     if ($numOrders 1) {

Stack Traces 2

[2/2] QueryException
Illuminate\Database\QueryException:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' in 'WHERE' (SQL: select * from `seats` where `event_id` = 1 and `status` = available limit 12)

  at /home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
  at Illuminate\Database\Connection->runQueryCallback('select * from `seats` where `event_id` = ? and `status` = ? limit 12', array(1, 'available'), object(Closure))
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:720)
  at Illuminate\Database\Connection->run('select * from `seats` where `event_id` = ? and `status` = ? limit 12', array(1, 'available'), object(Closure))
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:405)
  at Illuminate\Database\Connection->select('select * from `seats` where `event_id` = ? and `status` = ? limit 12', array(1, 'available'), true)
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2705)
  at Illuminate\Database\Query\Builder->runSelect()
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2694)
  at Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3230)
  at Illuminate\Database\Query\Builder->onceWithColumns(array('*'), object(Closure))
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2693)
  at Illuminate\Database\Query\Builder->get(array('*'))
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:710)
  at Illuminate\Database\Eloquent\Builder->getModels(array('*'))
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:694)
  at Illuminate\Database\Eloquent\Builder->get()
     (/home/globalgala/public_html/2026_backend_dev/scripts/generate-test-tickets.php:52)                
[1/2] PDOException
PDOException:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' in 'WHERE'

  at /home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:414
  at PDO->prepare('select * from `seats` where `event_id` = ? and `status` = ? limit 12')
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:414)
  at Illuminate\Database\Connection->Illuminate\Database\{closure}('select * from `seats` where `event_id` = ? and `status` = ? limit 12', array(1, 'available'))
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:753)
  at Illuminate\Database\Connection->runQueryCallback('select * from `seats` where `event_id` = ? and `status` = ? limit 12', array(1, 'available'), object(Closure))
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:720)
  at Illuminate\Database\Connection->run('select * from `seats` where `event_id` = ? and `status` = ? limit 12', array(1, 'available'), object(Closure))
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:405)
  at Illuminate\Database\Connection->select('select * from `seats` where `event_id` = ? and `status` = ? limit 12', array(1, 'available'), true)
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2705)
  at Illuminate\Database\Query\Builder->runSelect()
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2694)
  at Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3230)
  at Illuminate\Database\Query\Builder->onceWithColumns(array('*'), object(Closure))
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2693)
  at Illuminate\Database\Query\Builder->get(array('*'))
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:710)
  at Illuminate\Database\Eloquent\Builder->getModels(array('*'))
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:694)
  at Illuminate\Database\Eloquent\Builder->get()
     (/home/globalgala/public_html/2026_backend_dev/scripts/generate-test-tickets.php:52)