Code: Select all
CREATE PROCEDURE showAll()
BEGIN
SELECT * FROM myTable;
END
Code: Select all
// $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] . "
";
}
Einige Hinweise?
Code: Select all
mysqli::error()«Befehle nicht synchron; Sie können diesen Befehl jetzt nicht ausführen».
Mobile version