PDO with placeholders with AND clause

Posted in CategoryGeneral Discussion
  • Terry Ogbemudia 1 year ago
    Why using query and execute ? I will change query to prepare and try again 
  • Hder 2 years ago

    Can you tell me the proper syntax for this PDO query?  I seem to be getting syntax errors on the first line.


    $stmt = $db->query("SELECT * FROM flags WHERE postID = ? AND userID = ?");
    $row = $stmt->fetch();

Please login or register to leave a response.