Let’s start with what I expect. This SQL query:
SELECT * FROM champions WHERE id IN (107,60,121,164,245,143,427,64,111,80,134)
This is generated by PHP, but this is the output. This query, when copied to phpMyAdmin (SQL manager). Gives out correct results, which is 11 rows total. Important part of PHP script is:
echo "<pre>";
$result = $dbconn->query($req);
var_dump($result->fetch_assoc());
var_dump($req);
echo "</pre>";
Those are the only 2 var_dump
that I have, I sought through entire project with editor (using Find In Project). I have no weird “downloadable extensions”, nor anything else that works as var_dump
. Yet that outcome is this:
NULL
string(50) "SELECT id, revision FROM players WHERE id=XXX"
array(5) {
["id"]=>
string(2) "60"
["name"]=>
string(5) "Elise"
["title"]=>
string(16) "the Spider Queen"
["icon"]=>
string(67) "http://ddragon.leagueoflegends.com/cdn/7.1.1/img/champion/Elise.png"
["image"]=>
string(70) "http://ddragon.leagueoflegends.com/cdn/img/champion/splash/Elise_0.jpg"
}
string(78) "SELECT * FROM champions WHERE id IN (107,60,121,164,245,143,427,64,111,80,134)"
Null, that goes away if I remove var_dump($result->fetch_assoc());
.
string(50)
which is there for some reason (I assign it somewhere else, but it shouldn’t output at all, it should be saved in variable), that goes away if I remove var_dump($req);
Then I have an array(5)
which is 1st result given by SQL… but it’s only 1, should be 11.
And then I have string(78)
, which gets output again!!
Once again, those are only var_dump in the entire project.
You could tell that I have something else assigned to $req
. But it would be together in one var_dump, not four seperate.