Код: Выделить всё
CREATE PROCEDURE showAll()
BEGIN
SELECT * FROM myTable;
END
Код: Выделить всё
// $mysqli is a db connection
// first query:
if (!$t = $mysqli->query("call showAll()"))
die('Error in the 1st query');
while ($r = $t->fetch_row()) {
echo $r[0] . "
"; // this is ok
}
$t->free(); // EDIT (this doesn't help anyway)
// second query (does the same thing):
if (!$t = $mysqli->query("SELECT * from myTable"))
die('Error in the 2nd query'); // I always get this error
while ($r = $t->fetch_row()) {
echo $r[0] . "
";
}
Какие подсказки?
Код: Выделить всё
mysqli::error()«Команды не синхронизированы; сейчас вы не можете запустить эту команду».
Подробнее здесь: https://stackoverflow.com/questions/499 ... sults-givi
Мобильная версия