Database Error
Error:
SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'user_id' at row 1
SQL Query:
INSERT INTO `yozo_yxymedia`.`searches` (`q`, `loc`, `user_id`, `created`) VALUES ('dierenwinkel', '', '', '2024-03-29 02:02:58')
Notice:
If you want to customize this error message, create app/View/Errors/pdo_error.ctp
Stack Trace
- CORE/Cake/Model/Datasource/DboSource.php line 437 → PDOStatement->execute(array)
try {
$query = $this->_connection->prepare($sql, $prepareOptions);
$query->setFetchMode(PDO::FETCH_LAZY);
if (!$query->execute($params)) {
$this->_results = $query;
- CORE/Cake/Model/Datasource/DboSource.php line 403 → DboSource->_execute(string, array)
$options += array('log' => $this->fullDebug);
$t = microtime(true);
$this->_result = $this->_execute($sql, $params);
'INSERT INTO `yozo_yxymedia`.`searches` (`q`, `loc`, `user_id`, `created`) VALUES ('dierenwinkel', '', '', '2024-03-29 02:02:58')'
array()
- CORE/Cake/Model/Datasource/DboSource.php line 985 → DboSource->execute(string)
'values' => implode(', ', $valueInsert)
);
if ($this->execute($this->renderStatement('create', $query))) {
if (empty($id)) {
'INSERT INTO `yozo_yxymedia`.`searches` (`q`, `loc`, `user_id`, `created`) VALUES ('dierenwinkel', '', '', '2024-03-29 02:02:58')'
- CORE/Cake/Model/Model.php line 1721 → DboSource->create(Search, array, array)
}
}
if (!$db->create($this, $fields, $values)) {
$success = $created = false;
object(Search) {
name => 'Search'
belongsTo => array(
[maximum depth reached]
)
useDbConfig => 'default'
useTable => 'searches'
id => false
data => array(
[maximum depth reached]
)
schemaName => 'yozo_yxymedia'
table => 'searches'
primaryKey => 'id'
validate => array([maximum depth reached])
validationErrors => array([maximum depth reached])
validationDomain => null
tablePrefix => ''
alias => 'Search'
tableToModel => array(
[maximum depth reached]
)
cacheQueries => false
hasOne => array([maximum depth reached])
hasMany => array([maximum depth reached])
hasAndBelongsToMany => array([maximum depth reached])
actsAs => null
Behaviors => object(BehaviorCollection) {}
whitelist => array([maximum depth reached])
cacheSources => true
findQueryType => null
recursive => (int) 1
order => null
virtualFields => array([maximum depth reached])
__backAssociation => array([maximum depth reached])
__backInnerAssociation => array([maximum depth reached])
__backOriginalAssociation => array([maximum depth reached])
__backContainableAssociation => array([maximum depth reached])
findMethods => array(
[maximum depth reached]
)
}
array(
(int) 0 => 'q',
(int) 1 => 'loc',
(int) 2 => 'user_id',
(int) 3 => 'created'
)
array(
(int) 0 => 'dierenwinkel',
(int) 1 => '',
(int) 2 => false,
(int) 3 => '2024-03-29 02:02:58'
)
- APP/Controller/PlacesController.php line 309 → Model->save(array)
# look for the same search by the same person the last 2 hours
$search = array('Search' => array('Search.created >' => date('Y-m-d', strtotime("-2 hours")), 'q' => $q, 'loc' => $loc, 'user_id' => User::get('id')));
$record = $searchModel->field('id', $search['Search']);
if (empty($record)) $searchModel->save($search);
array(
'Search' => array(
'Search.created >' => '2024-03-29',
'q' => 'dierenwinkel',
'loc' => '',
'user_id' => false
)
)
- [internal function] → PlacesController->search()
- CORE/Cake/Controller/Controller.php line 485 → ReflectionMethod->invokeArgs(PlacesController, array)
'action' => $request->params['action']
));
}
return $method->invokeArgs($this, $request->params['pass']);
object(PlacesController) {
name => 'Places'
helpers => array(
[maximum depth reached]
)
components => array(
[maximum depth reached]
)
user => null
uses => array(
[maximum depth reached]
)
request => object(CakeRequest) {}
response => object(CakeResponse) {}
viewPath => 'Places'
layoutPath => null
viewVars => array([maximum depth reached])
view => 'search'
layout => 'yozo'
autoRender => true
autoLayout => true
Components => object(ComponentCollection) {}
viewClass => 'View'
View => null
ext => '.ctp'
plugin => null
cacheAction => false
passedArgs => array(
[maximum depth reached]
)
scaffold => false
methods => array(
[maximum depth reached]
)
modelClass => 'Place'
modelKey => 'place'
validationErrors => null
Session => object(SessionComponent) {}
Redirect => object(RedirectComponent) {}
Email => object(EmailComponent) {}
Connect => object(ConnectComponent) {}
RequestHandler => object(RequestHandlerComponent) {}
Seo => object(SeoComponent) {}
Auth => object(AuthComponent) {}
Yourls => object(YourlsComponent) {}
Group => object(Group) {}
}
array()
- CORE/Cake/Routing/Dispatcher.php line 103 → Controller->invokeAction(CakeRequest)
$controller->startupProcess();
$render = true;
$result = $controller->invokeAction($request);
if ($result instanceof CakeResponse) {
object(CakeRequest) {
params => array(
[maximum depth reached]
)
data => array([maximum depth reached])
query => array(
[maximum depth reached]
)
url => 'plaats/zoeken/q:dierenwinkel/'
base => ''
webroot => '/'
here => '/plaats/zoeken/q:dierenwinkel/'
}
- CORE/Cake/Routing/Dispatcher.php line 85 → Dispatcher->_invoke(PlacesController, CakeRequest, CakeResponse)
));
}
return $this->_invoke($controller, $request, $response);
}
object(PlacesController) {
name => 'Places'
helpers => array(
[maximum depth reached]
)
components => array(
[maximum depth reached]
)
user => null
uses => array(
[maximum depth reached]
)
request => object(CakeRequest) {}
response => object(CakeResponse) {}
viewPath => 'Places'
layoutPath => null
viewVars => array([maximum depth reached])
view => 'search'
layout => 'yozo'
autoRender => true
autoLayout => true
Components => object(ComponentCollection) {}
viewClass => 'View'
View => null
ext => '.ctp'
plugin => null
cacheAction => false
passedArgs => array(
[maximum depth reached]
)
scaffold => false
methods => array(
[maximum depth reached]
)
modelClass => 'Place'
modelKey => 'place'
validationErrors => null
Session => object(SessionComponent) {}
Redirect => object(RedirectComponent) {}
Email => object(EmailComponent) {}
Connect => object(ConnectComponent) {}
RequestHandler => object(RequestHandlerComponent) {}
Seo => object(SeoComponent) {}
Auth => object(AuthComponent) {}
Yourls => object(YourlsComponent) {}
Group => object(Group) {}
}
object(CakeRequest) {
params => array(
[maximum depth reached]
)
data => array([maximum depth reached])
query => array(
[maximum depth reached]
)
url => 'plaats/zoeken/q:dierenwinkel/'
base => ''
webroot => '/'
here => '/plaats/zoeken/q:dierenwinkel/'
}
object(CakeResponse) {
}
- APP/webroot/index.php line 92 → Dispatcher->dispatch(CakeRequest, CakeResponse)
App::uses('Dispatcher', 'Routing');
$Dispatcher = new Dispatcher();
$Dispatcher->dispatch(new CakeRequest(), new CakeResponse(array('charset' => Configure::read('App.encoding'))));
object(CakeRequest) {
params => array(
[maximum depth reached]
)
data => array([maximum depth reached])
query => array(
[maximum depth reached]
)
url => 'plaats/zoeken/q:dierenwinkel/'
base => ''
webroot => '/'
here => '/plaats/zoeken/q:dierenwinkel/'
}
object(CakeResponse) {
}