PHP5 PDO SQL QUERY?

$pdo->query("SELECT * FROM `users` WHERE `id` = 81 AND `hashcode` = '2d37da72ec76bc838eda629b659ba5f4'")->fetch();
(bool(false))

$pdo->query("SELECT * FROM `users`")->fetch();
(Normal response)


While the same query in PHP My Admin gets it all right
July 9th 19 at 10:12
1 answer
July 9th 19 at 10:14
pdo::query can return false in one case: you have PDO::ATTR_ERRMODE set to an incorrect value. Install it in a normal PDO::ERRMODE_EXCEPTION.
Nothing happened
In fact, that the returned errorInfo()
Array
(
[0] => 00000
[1] =>
[2] =>
) - Birdie.Heathcote commented on July 9th 19 at 10:17
Exactly the same query in MySQLI works - Birdie.Heathcote commented on July 9th 19 at 10:20
the error logs are saying? - nasir17 commented on July 9th 19 at 10:23
: the fact of the matter is that nothing. 00000 returns on success - Birdie.Heathcote commented on July 9th 19 at 10:26
0000 means success. see the connection settings or you are not clinging to the database or something - nasir17 commented on July 9th 19 at 10:29
: https://docs.oracle.com/cd/F49540_01/DOC/server.81...

Docks of Oracle say that you are wrong.

And about the base -- that's right, because all other requests work. - Birdie.Heathcote commented on July 9th 19 at 10:32
: Uh?
00000 successful completion - nasir17 commented on July 9th 19 at 10:35

Find more questions by tags PHP PDOPHPMySQLWeb Development