Page 1 of 1

Commands out of sync; you can't run this command now

PostPosted: Mon Sep 18, 2017 11:07 pm
by orla4916
Hello, i got this error when i execute 2 sql query, one next the other.. i am using tablegateway. So when i execute each one individualy it works! but not together

$noticias = $this->adapter->query("SELECT * FROM noticias WHERE status = 1");

$datos = $noticias->execute();

return $datos;

i have that code in a model, so i execute the same with another table and i got this errors.

Statement couldn't be produced with sql: SELECT * FROM noticias WHERE status = 1

File:
C:\wamp64\www\gobierno\vendor\zendframework\zend-db\src\Adapter\Driver\Mysqli\Statement.php:211
Message:
Commands out of sync; you can't run this command now

anybody knows why?