Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/25/2020 in all areas

  1. NOTE: both instances of $db->query(..) in the above post should be $db->prepare(..)
    2 points
  2. plogsID=plogsID will always be true. SELECT * FROM blogs WHERE blogsStatus=1 AND blogsID=blogsID You have several options. See https://www.php.net/manual/en/pdo.prepare.php, but to get you started... $stmt = $db->query('SELECT * FROM blogs WHERE blogsStatus=1 AND blogsID=:blogsID'); $stmt->execute(['blogsID' => $blogsID]); $result = $stmt->fetch(PDO::FETCH_ASSOC); $stmt = $db->query('SELECT * FROM blogs WHERE blogsStatus=1 AND blogsID=?'); $stmt->execute([$blogsID]); $result = $stmt->fetch(PDO::FETCH_ASSOC); Or you can use use bindParam() or bindValue(), but don't worry about that for now.
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.