Running more than one Mysql Query using PHP
I am needing to run more than one Mysql Query using PHP. I have a site and pull all the information from the databse

    $sql = "SELECT * FROM $table WHERE ID=$escape";
    $query = mysql_query($sql) or die(mysql_error());
    $rentals = mysql_fetch_assoc($query);

Now I have two other queries I need to also run for Previous and Next Buttons


    $sqlPrev = 'SELECT `id` FROM `table`
            WHERE `id` < '$curId' AND `catId` = '$curCat'
            ORDER BY `id` DESC LIMIT 1;

    $sqlNext = 'SELECT `id` FROM `table`
            WHERE `id` > '$curId' AND `catId` = '$curCat'
            ORDER BY `id` ASC LIMIT 1;

I have the coding right when I run these in PHP MyAdmin, however when I try to execute them via the website I get a mysql error!

Running more than one Mysql Query using PHP
===

I am needing to run more than one Mysql Query using PHP. I have a site and pull all the information from the databse

    $sql = "SELECT * FROM $table WHERE ID=$escape";
    $query = mysql_query($sql) or die(mysql_error());
    $rentals = mysql_fetch_assoc($query);

Now I have two other queries I need to also run for Previous and Next Buttons


    $sqlPrev = 'SELECT `id` FROM `table`
            WHERE `id` < '$curId' AND `catId` = '$curCat'
            ORDER BY `id` DESC LIMIT 1;

    $sqlNext = 'SELECT `id` FROM `table`
            WHERE `id` > '$curId' AND `catId` = '$curCat'
            ORDER BY `id` ASC LIMIT 1;

I have the coding right when I run these in PHP MyAdmin, however when I try to execute them via the website I get a mysql error!
