hi guys having a problem getting a single value from a mysql query getting all sorts of problems - heres my latest version below
mysql_connect($host,$user,$password) or die( "Unable to select database");
mysql_select_db("mydatabase"); // select database to use.
$user = 84;
$sql1="SELECT `order_id` FROM `table1` WHERE `user_id`= '$user'";
$array = mysql_fetch_array('$sql1');
$sqlres1 = $array[order_id];
echo $user;
$sql2="UPDATE `table2` Set `order_status` = 'C' WHERE `order_id` = '$sqlres1' And `order_status` = 'P'";
mysql_query($sql2);
echo $sql2;
mysql_close();
echo "Successfully completed";
basically i want to get the value returned from $sql1 and use it as part of $sql2 - i'm getting a Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource at the moment
can someone please help!!!!