I'm trying to loop through a prepared statement and joining two tables together and have the results spit out on the page.
$stmt = $conn->stmt_init();
$sql = "SELECT title, article, DATE_FORMAT(updated, '%W, %M %D, %Y') AS updated,
filename, caption FROM blog INNER JOIN images USING (image_id)
WHERE blog.article_id = ?";
$stmt->bind_param('i', $_GET['article_id']);
$stmt->execute();
$row = $stmt->fetch_assoc();
I need this on my front page so using $_GET['article_id'] won't exactly work because $_GET hasn't been set in the query string. What is another way of binding the table in my DB to my statement so that I can loop through it?