I want to have result of my query as it was before I replaced db connection using PDO. How can I get the query as i t was before I implemented PDO?
This is my query:
$query = "SELECT `id_affirmation`, `affirmation`, `author`, `user_rate`, am.date, am.time, hua.date, hua.time FROM `affirmation_male` am JOIN `history_user_affirmation` hua ON am.id_affirmation = ua.affirmation_id WHERE hua.user_id = '" . $id_user . "' ORDER BY STR_TO_DATE(hua.date, '%d-%m-%Y') DESC, hua.time DESC"; For some reason the result of query when I use PDO is i got date from affirmation_male. Do you know why?
datecolumns?$_POST,$_GETor any user data directly in your query. Refer to PHP The Right Way for general guidance and advice.