When I log into MYSQL (via command line) and use the following query, I get a result set that I expect:
SELECT DISTINCT c.hits, c.cid, c.name, c.style, c.town, c.deliver, m.pid, m.pname, m.lgprice, s.sid, s.sname, s.sprice FROM customers AS c, menus AS m, specials AS s WHERE m.cid=2 ORDER BY c.hits;
In my PHP file, the query runs successfully, but produces a completely different erroneous result set:
// 1.QUERY DB WITH INPUT
$queryVendor = "SELECT DISTINCT c.hits, c.cid, c.name, c.style, c.town, c.deliver, m.pid, m.pname, m.lgprice, s.sid, s.sname, s.sprice FROM customers AS c, menus AS m, specials AS s WHERE m.cid=$id ORDER BY c.hits";
$result = mysql_query($queryVendor);
Thanks,
Please help. Does PHP interpret SQL queries and modify them when it sends them to MYSQL?