I have the following code which creates a selection based upon '$id'. The problem that I'm having is I only get the first variable. Is there something with the bind command I'm missing?
A
/* check connection */
if(!mysqli_connect_errno())
{
/*** our SELECT query ***/
$sql = "SELECT id, job_name, job_number, owner FROM ada where id = '$id' ";
/*** prepare statement ***/
if($stmt = $mysqli->prepare($sql))
{
/*** execute our SQL query ***/
$stmt->execute();
/*** bind the results ***/
$stmt->bind_result($id, $job_name, $job_number, $owner);
}
/*** close connection ***/
$mysqli->close();
}
else
{
/*** if we are unable to connect ***/
echo 'Unable to connect';
exit();
}