Php and Mysqli - can you use a prepared statement on a SELECT clause that does not have a WHERE clause?

advertisements
SELECT id, title, posted, duration, thumbnail, email, first_name
FROM customers


Here is a brief example (too long for comments) since you're using MySQLi:

Object oriented style:

/* prepare query */
$stmt = $mysqli->prepare("SELECT id, title, posted, duration, thumbnail, email, first_name FROM customers");

/* execute query */
$stmt->execute();

Procedural style (where $conn is the database connection):

/* prepare */
$stmt = mysqli_prepare($conn, "SELECT id, title, posted, duration, thumbnail, email, first_name FROM customers");

/* execute query */
mysqli_stmt_execute($stmt);