Trying to join the order table and order detail together on the detail page
I trying to create an order history and detail page to my site. When I test the pages I can get the history page to display information but when I click the link to see the detail page. I get an sql sytax error was 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 'FROM orders INNER JOIN -1 ON orders.OrdersID = -1.DetailOrdersID WHERE -1.DetailO' at line 1.
I have followed the instruction posted on your web site regarding how to create an order history page. I tried to change the WADAorderdetails server behavior for the detail page.
I entered the code to join the orders and ordersdetails tables as follows:
SELECT orders.*, orderdetails.*
FROM orders INNER JOIN orderdetails ON orders.OrderID = orderdetails.DetailsOrderID
WHERE orderdetails.DetailOrderID = WADAOrderID AND order.OrderUserID = paramUserID
I did add the variable parameter paramUserID. My question is for the first variable parameter was colname. What should the first variable name be? What did I do wrong?