Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/11/2015, 13:05
andres_martinez_es
 
Fecha de Ingreso: noviembre-2015
Mensajes: 3
Antigüedad: 5 años, 6 meses
Puntos: 0
Pregunta SQLSTATE[HY093]: Invalid parameter number: parameter was not defined

Me encuentro probando un código para realizar las operaciones básicas (agregar, eliminar, modificar, consultar), les comento que al momento de ejecutar el código de altas me manda la siguiente excepción, he probado con diversos códigos, yo creo entender que los parámetros de la consulta SQL insert no coincide con los parámetros que le paso, pero ya me cansé de cambiarle, por acá y por allá, y nomás no doy...

Me está generando 2 excepciones, pero la segunda se encuentra más detallada, espero me puedan apoyar

An error occurred
An error occurred during execution; please try again later.
Additional information:
Zend\Db\Adapter\Exception\InvalidQueryException
File:
C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\Db\Adapter\Driver\Pdo\Stat ement.php:244
Message:
Statement could not be executed (HY093 - - )
Stack trace:
#0 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\Db\TableGateway\AbstractTa bleGateway.php(307): Zend\Db\Adapter\Driver\Pdo\Statement->execute()
#1 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\Db\TableGateway\AbstractTa bleGateway.php(263): Zend\Db\TableGateway\AbstractTableGateway->executeInsert(Object(Zend\Db\Sql\Insert))
#2 C:\xampp\htdocs\cursozend\module\Usuarios\src\Usua rios\Model\UsuarioTabla.php(51): Zend\Db\TableGateway\AbstractTableGateway->insert(Array)
#3 C:\xampp\htdocs\cursozend\module\Usuarios\src\Usua rios\Controller\RegistroController.php(70): Usuarios\Model\UsuarioTabla->guardarUsuario(Object(Usuarios\Model\Usuario))
#4 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\Mvc\Controller\AbstractAct ionController.php(82): Usuarios\Controller\RegistroController->processAction()
#5 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#6 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\EventManager\EventManager. php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#7 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\EventManager\EventManager. php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#8 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\Mvc\Controller\AbstractCon troller.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#9 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\Mvc\DispatchListener.php(9 3): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request) , Object(Zend\Http\PhpEnvironment\Response))
#10 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#11 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\EventManager\EventManager. php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#12 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\EventManager\EventManager. php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#13 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\Mvc\Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#14 C:\xampp\htdocs\cursozend\public\index.php(17): Zend\Mvc\Application->run()
#15 {main}


Segunda excepcion *************************************************

Previous exceptions:
PDOException
File:
C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\Db\Adapter\Driver\Pdo\Stat ement.php:239
Message:
SQLSTATE[HY093]: Invalid parameter number: parameter was not defined
Stack trace:
#0 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\Db\Adapter\Driver\Pdo\Stat ement.php(239): PDOStatement->execute()
#1 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\Db\TableGateway\AbstractTa bleGateway.php(307): Zend\Db\Adapter\Driver\Pdo\Statement->execute()
#2 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\Db\TableGateway\AbstractTa bleGateway.php(263): Zend\Db\TableGateway\AbstractTableGateway->executeInsert(Object(Zend\Db\Sql\Insert))
#3 C:\xampp\htdocs\cursozend\module\Usuarios\src\Usua rios\Model\UsuarioTabla.php(51): Zend\Db\TableGateway\AbstractTableGateway->insert(Array)
#4 C:\xampp\htdocs\cursozend\module\Usuarios\src\Usua rios\Controller\RegistroController.php(70): Usuarios\Model\UsuarioTabla->guardarUsuario(Object(Usuarios\Model\Usuario))
#5 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\Mvc\Controller\AbstractAct ionController.php(82): Usuarios\Controller\RegistroController->processAction()
#6 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#7 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\EventManager\EventManager. php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#8 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\EventManager\EventManager. php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#9 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\Mvc\Controller\AbstractCon troller.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#10 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\Mvc\DispatchListener.php(9 3): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request) , Object(Zend\Http\PhpEnvironment\Response))
#11 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#12 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\EventManager\EventManager. php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#13 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\EventManager\EventManager. php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#14 C:\xampp\htdocs\cursozend\vendor\zendframework\zen dframework\library\Zend\Mvc\Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 C:\xampp\htdocs\cursozend\public\index.php(17): Zend\Mvc\Application->run()
#16 {main}


saludos amigos... que tengan excelente día