So what I'd really like to do is combine the two queries. I broke them up into two to help me figure out where the issue is. sql2 is where the issue is. When I run it in phpMyAdmin (without WHERE)it works so what's going on here?
$holidayID = formval('holidayID');  
            $sort= formval('sort', 'rating');
            $dir = formval('dir', 'ASC');
            $sql = "SELECT recipeID, holidayID, recipeName, rating
                FROM recipes
                WHERE holidayID = $holidayID
            ORDER BY $sort $dir ";
//execute
$result = mysqli_query($dbc, $sql);
$sql2 = "SELECT recipes.holidayID, holidays.holidayName
            FROM recipes
            JOIN holidays ON recipes.holidayID=holidays.holidayID
            WHERE holidayID = $holidayID
            LIMIT 1";
$result2 = mysqli_query($dbc, $sql2);
var_dump($result2);
The first query works fine. So what am I doing wrong? Thank you for your time.
 
     
    