211655 Posted May 31, 2005 Share Posted May 31, 2005 hi i am writing this code: $orders_query5 = tep_db_query("insert into custom_o (c_id, c_product_name, c_product_model, c_product_price, c_shipping_price, c_product_quantity, c_shipping_type) values (\"$c_id2\", \"$itemname\",\"$itemmodel\", \"$itemprice\", \"$shippingcharge\", \"$quantity\", \"$ship_type\") "); i get this erro Parse error: parse error, unexpected T_VARIABLE in i get this for the line where above code is. when i take the line out rest of the code works. 211655 SEO Optimization Export Orders into CSV file Link to comment Share on other sites More sharing options...
Dada1 Posted May 31, 2005 Share Posted May 31, 2005 Because thier is a variable in that code thats not listed in the data base that it's trying to call. If thier is a SQL with the contribution you need to run it or insert it in the proper place of your data base. Also this code looks like its open also. $orders_query5 = tep_db_query("insert into custom_o Link to comment Share on other sites More sharing options...
FalseDawn Posted May 31, 2005 Share Posted May 31, 2005 No, the error is in PHP, not MySQL. I can't see anything blatantly wrong with that code - you may have a curly brace missing or extra somewhere - the error is often not where you think it is... Link to comment Share on other sites More sharing options...
Dada1 Posted May 31, 2005 Share Posted May 31, 2005 No, the error is in PHP, not MySQL. Exactly, like I said thier is a extra variable in the PHP code that is trying to call a variable in the Database that doesn't exist. The first part of that code starts with tep_db_query which is a call to the DB. Doesn't mean it is a problem with the DB, just means that the code has a extra varible that doesn't exist in the DB. Link to comment Share on other sites More sharing options...
FalseDawn Posted May 31, 2005 Share Posted May 31, 2005 Once you reach the bottom of the hole, you might as well stop digging... Link to comment Share on other sites More sharing options...
211655 Posted May 31, 2005 Author Share Posted May 31, 2005 MY BAD. JUST ONE LINE ABOVE THIS CODE I WAS MISSING ; TO END THE LINE. how stupid i am. thanks everyone. 211655 SEO Optimization Export Orders into CSV file Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.