Answer the question
In order to leave comments, you need to log in
How to get rid of duplicate output values of a PDO::query() query?
Good afternoon. I am learning PHP and MariaDB stack. There is the following code for accessing the database:
$db = new PDO('mysql:host=localhost;dbname=taxi', 'root', '123');
$sql = 'SELECT * FROM autos WHERE id = 1';
$result = $db->query($sql);
$arr = $result->fetch();
var_dump($arr);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question