When i ran the query in phpMyAdmin to test if it was correct and i got this error:
#1064 - 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 '.`supplier_dropship_cost_price`, `product_list`.`dropship_addon_percent`,' at line 1
What im i doing wrong here? Thanks in advance for any help/tip.
there is no comma after mycart.amount
you should not use appends to build this, it leaves room for error and makes the sql debugger see it all as one line, so it will always say line 1. in php, queries should look like:
$query="SELECT blah, blah,
JOIN other_table ON blah
GROUP BY stuff, ORDER BY stuff
rather than using all of those .= statements.
Database design and performance optimization, custom PHP scripts, and publicly available resources for developers! http://www.zeropride.com