-1
$result = $SQL->query("select count(*) AS codes_count from gamecodes WHERE gamecode='.$SQL->quote($gamecode).' AND alreadyused='N';")->fetch();
$counts = $result['codes_count'];
echo $counts;
When I run this SQL statement in the database, the return is 1
.
When I run this SQL statement by PHP the return is 0
.
What is wrong?
Maybe use fetchOne(); and merge a result var_dump
– Otto
How do I do this in PHP? I Googled and only got results from Pyton
– Lucas Ferraz
that what the var_dump ? var_dump($variable);
– Otto
didn’t work, bugged everything
– Lucas Ferraz
Bugle not It prints a dump of the variable
– Otto
it is easier to update the question with the return
– Otto
and of course already takes the opportunity to put in Portuguese .... Oce is in the stack Brazil
– Otto
string(1) "0" from that
– Lucas Ferraz
ta using some orm or as ta doing ?
– Otto
is a platform called Gesior, is a gaming site. It uses PDO.
– Lucas Ferraz