Originally Posted by Old Pedant
Well, just for starters, why are you using
$sql = "SELECT customers.CompanyName, customers.CustomerID, orders.OrderID
FROM customers, orders
WHERE customers.CompanyName LIKE '" . $_GET['customer'] . "%'
AND customers.CustomerID LIKE orders.CustomerID;";
instead of the query you say works??
Sorry about that. That is just from a different page. Here:
$sql = "SELECT customers.CompanyName, orders.CustomerID, orders.OrderID, order_details.OrderID, order_details.ProductID, products.ProductID, products.ProductName, products.UnitPrice, products.UnitsInStock, orders.shipVia, shippers.shipperId, shippers.CompanyName, orders.Freight
FROM customers, orders, order_details, products, shippers
WHERE customers.CustomerID = orders.CustomerID
AND orders.OrderID = '" . $_GET['order'] . "%'
AND orders.OrderID = order_details.OrderID
AND order_details.ProductID = products.productID
AND orders.ShipVia = shippers.ShipperID
ORDER BY products.productName, products.UnitsInStock, products.UnitPrice, shippers.CompanyName, orders.Freight";