Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resource id error

Status
Not open for further replies.

DaRNCaT

Technical User
Dec 18, 2002
566
NZ
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.

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..
 
Solved now.

----------------------------------------
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..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top