i am writing a query with inner join involved in it but having an doubt on how to write it using prepared statement here is my query
$query = "SELECT * FROM detail INNER JOIN shortlisted ON detail.id = shortlisted.shortlisted_id";
$result = mysqli_query($conn, $query);
if(mysqli_affected_rows($conn)>0){
if($row = mysqli_fetch_assoc($result))
{
//html part
}
also what should we pass in bind param if we have no particular condition to satisfy for our select query like
$query = "select * from details";
$stmt = $conn->prepare($sql);
//$stmt->bind_param();
$stmt->execute();
$stmt->bind_result($full_name);
while ($stmt->fetch()) {
//html code
}