Answer the question
In order to leave comments, you need to log in
How to use prepared queries?
I have a request to read data, read. What is the correct way to use prepared query for reading?
My request
$sql = $pdo->prepare("SELECT xf_list.id as id_f, xf_list.title as title_f, xf_list.url as url_f, xf_category.id as id_c, xf_category.title as title_c, xf_type.title as title_t, xf_type.url as url_t FROM `xf_list` LEFT JOIN `xf_category` ON `xf_list` . `category_id`=`xf_category` . `id` LEFT JOIN `xf_type` ON `xf_list` . `type_id`=`xf_type` . `id`");
$sql->execute();
$result = $sql->fetchAll(PDO::FETCH_OBJ);
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