Skip to main content
5 events
when toggle format what by license comment
May 30, 2013 at 15:43 comment added gb2016 Also I should say the order ID is not based on the default ID automatically assigned by mySQL (id column) -- it is assigned by using sha1(uniqid(mt_rand(), true)) and there is an actual column called orderid. I used sha1(uniqid(mt_rand(), true)) not for security just wanted something that would not have much chance of duplicating an order ID across 2 unrelated orders
May 30, 2013 at 15:39 comment added gb2016 I am not sure if this will work because the same order ID is replicated many times in the orders database. When a customer places an order, each order has unique product ID, but will have the same order ID for each row. If they order 10 products, 10 identical order IDs are inserted in to the orders database but they all have a different product ID. The e-mail for the specific customer is then added to each of the 10 rows so when the customer logs in there is a reference point (their e-mail) to pull up their order history, but I only want to display each order ID 1 time to the customer
May 30, 2013 at 15:37 comment added l0b0 DISTINCT gives you distinct rows, no matter what the contents of your database. Of course, if you have multiple duplicate IDs in xxxx_orders.orders your DB has bigger problems.
May 30, 2013 at 11:54 comment added gb2016 Thank you. The reasoning behind all the notes is for my own personal use -- as I am new to coding, it just makes it so much easier to understand the logic. It's also my own web page so nobody else will see it. Looking in to the other stuff.
May 30, 2013 at 8:26 history answered l0b0 CC BY-SA 3.0