I'm asking for my partner, who has been building a shopping cart, and hit a problem, can anyone answer this- is it a mysql problem not a php one?
thanks.
----------------------------------------
Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
thanks.
Code:
$result_query7 = mysql_query("SELECT cookieId, itemId, sizeId, optId, qty, product_name, option_name, size_size, ".$local_price."_price FROM a_cart, a_product, a_option, a_size where a_cart.cookieId = '" . $bob . "' AND a_cart.sizeId = a_size.size_ID AND a_cart.optId = a_option.option_ID AND a_cart.itemId = a_product.product_ID");
echo $result_query7.'result query<br>';
echo "SELECT cookieId, itemId, sizeId, optId, qty, product_name, option_name, size_size, {$local_price}_price FROM a_cart, a_product, a_option, a_size where a_cart.cookieId = '" . $bob . "' AND a_cart.sizeId = a_size.size_ID AND a_cart.optId = a_option.option_ID AND a_cart.itemId = a_product.product_ID";
echo "<br>got past result query<br>";//gets to here then crashes
$result = mysql_query($result_query7, $db) or die(mysql_error());
the error I'm getting is
Resource id #14result query <--echoeed out to find what Resource id #14 is
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'Resource id #14' at line 1
----------------------------------------
Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..