FINEGIFTS Posted December 8, 2002 Posted December 8, 2002 I has a customer send me this error today after checking out can someone explain this one? 1064 - You have an error in your SQL syntax near 'AND o.orders_status != 99999 WHERE customers_id = '14'' at line 3 SELECT DATE_FORMAT(date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, op.products_name, opd.orders_products_download_id, opd.orders_products_filename, opd.download_count, opd.download_maxdays FROM orders o, orders_products op, orders_products_download opd AND o.orders_status != 99999 WHERE customers_id = '14' AND o.orders_id = '7' AND op.orders_id = '7' AND opd.orders_products_id=op.orders_products_id AND opd.orders_products_filename<>'' "If it is not broke Don't fix it/ If it is then fix it good the first time and you never have to fix it again." If at first you can not figure it out ask in the forums or search then ask!
sw45859 Posted December 8, 2002 Posted December 8, 2002 1064 - You have an error in your SQL syntax near 'AND o.orders_status != 99999 WHERE customers_id = '14'' at line 3 SELECT DATE_FORMAT(date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, op.products_name, opd.orders_products_download_id, opd.orders_products_filename, opd.download_count, opd.download_maxdays FROM orders o, orders_products op, orders_products_download opd WHERE o.orders_status != 99999 AND customers_id = '14' AND o.orders_id = '7' AND op.orders_id = '7' AND opd.orders_products_id=op.orders_products_id AND opd.orders_products_filename<>'' there you go all fixed, lol, compare the two and you will see where the problem was.
mattice Posted December 8, 2002 Posted December 8, 2002 To be more specific... the WHERE clause should come before the AND condition.... so did you/the client pasted this incorrectly? Or is it written like that in the actual file??? If so change the order... SELECT blabla FROM blabla WHERE blabla AND blalbla HTH Mattice "Politics is the art of preventing people from taking part in affairs which properly concern them"
FINEGIFTS Posted December 9, 2002 Author Posted December 9, 2002 i dont know the client said that is how it came on the screen at the checkout_sucsess i am using the pay-pal/ipn module 0.96 for new checkout but anyhow i will change it "If it is not broke Don't fix it/ If it is then fix it good the first time and you never have to fix it again." If at first you can not figure it out ask in the forums or search then ask!
FINEGIFTS Posted December 9, 2002 Author Posted December 9, 2002 i found it in the downloads section of the paypal-ipn mod and all is fixed and it wasn't pasted wrong it was exact like it showed in the coding >>>>> me = :stupid: "If it is not broke Don't fix it/ If it is then fix it good the first time and you never have to fix it again." If at first you can not figure it out ask in the forums or search then ask!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.