I am trying to get the output from one SQL statement into another SQL statement, although it does not seem to be working. Is there an alternative, and how would I use it?
$id = ($_SESSION["user_id"]);
$query1 = "SELECT event_id FROM booking where user_id = '$id'";
$result = mysql_query($query1);
$query2 = "SELECT * FROM event where event_id = '$result'";
$results = mysql_query($query2);