I have 2 tables which are the customers table and orders table. Basically my problem is that it always give me an error which is 'unknown field list'. I have tried in phpmyadmin XAMPP it works the only problem is that when I use it in VS studio c# it gives me an error. I'm confused the back ticks '`' don't work but the back ticks work on localhost. Please help me.
This is my sql syntax:
SQL = "SELECT o.`Order ID`, o.Description, o.Amount
FROM tbl_orders AS o
INNER JOIN tbl_customers AS c ON o.`Order ID` = c.`Order ID`
WHERE c.`Customer ID` = '" + cust_id + "'";
cmd.Connection = dbCon;
cmd.CommandText = SQL;
rdr= cmd.ExecuteReader();
dt.Load(rdr);