techker Posted January 6, 2010 Share Posted January 6, 2010 Hey guys i have a litle question.. i have a catalogue database with a order-order details and products tables. now when an order is passt it goes true an xml flash page.. but i need to mode it so i want to drop the flash and only use php. so in the databse in the order table there is orderID and user info.then in orderDetails theres the orderID and a product id so what i did up to know is extract all orders so i get orderID name price.. but know i need details so i linked it to a OrderDetails page that gives me OrderId ProductId QTY.. so thats cool but know i need to get the product details from Product Table.. so Product id gives me a descrition of the products... ahhh is there a way to make it one?lol! or at least to see the order page but when you click more details or print you get the product descritption... thx guys!! Quote Link to comment https://forums.phpfreaks.com/topic/187481-multiple-pages-to-one/ Share on other sites More sharing options...
ignace Posted January 6, 2010 Share Posted January 6, 2010 Your looking for JOIN http://dev.mysql.com/doc/refman/5.0/en/join.html This will join all table results together creating one table with all required information Quote Link to comment https://forums.phpfreaks.com/topic/187481-multiple-pages-to-one/#findComment-989984 Share on other sites More sharing options...
techker Posted January 6, 2010 Author Share Posted January 6, 2010 ok so i got this going $order=$_GET['order']; $date=$_GET['Date']; $query = "select * from tblCommande right join tblCommandeDetail on tblCommande.NoCommande = $order AND $date " ; $result = mysql_query($query) or die(mysql_error()); <? while($row = mysql_fetch_array($result)){ echo $row['UName']. " - ". $row['IDProduit']; echo "<br />"; }?> works good but not completly..i dont have all the information? Quote Link to comment https://forums.phpfreaks.com/topic/187481-multiple-pages-to-one/#findComment-989993 Share on other sites More sharing options...
fenway Posted January 7, 2010 Share Posted January 7, 2010 Your strings aren't quoted. Quote Link to comment https://forums.phpfreaks.com/topic/187481-multiple-pages-to-one/#findComment-990442 Share on other sites More sharing options...
techker Posted January 7, 2010 Author Share Posted January 7, 2010 does it matter?cause it works? Quote Link to comment https://forums.phpfreaks.com/topic/187481-multiple-pages-to-one/#findComment-990532 Share on other sites More sharing options...
fenway Posted January 13, 2010 Share Posted January 13, 2010 does it matter?cause it works? It can't work ... it just look like it works. Quote Link to comment https://forums.phpfreaks.com/topic/187481-multiple-pages-to-one/#findComment-994365 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.