mysql - Unable to fetch the order id through last updated tracking id -


This is the question to fetch order_id from this order's history table

  $ sql = select "DISTINCT (` order_id`) from `` Dibi_ PREFIX. "Order_history` where Trakkod = '". $ Trakkod. "the";  

status ...

The order is packaged when the tracking ID is assigned to it and the order_history has been added to the table, if the order has been sent by another courier service, then order another in the order_ history table According to the above given question it will fetch order_id for tracking_no. Even the order history table also changed.

Another case: - If the tracking number Wrongly assigned the order and then changed it, so two order_id will be brought through the above question.

How can I find the right way to resolve it?

order_history The table is like this

  create table 'order_history` (`order_histo ry_id` int (11) taps Attangrement, `order_id` int (11) NOT NULL, Ordr_stetus_aid` Int (5) narwhal,` Notifik` Tinint (1) is not text NOT NULL, `Tippni`" Detaddeed 'Detataim tap default '0000-00-00 00:00:00', `Trakkod 'varchar (15) character set UTF8 COLLATE utf8_unicode_ci nULL default' ',' bearer 'varchar (15) in the character set utf8 COLLATE utf8_unicode_ci nULL default' ',` Vearhaus_aidi` Tinint (1) default '0', 'logistics-Partonr_aidi` Int (11) default nULL, `dest_area_code` varchar (5) character set utf8 COLLATE utf8_unicode_ci tap,` dest_service_cent er_code` varchar (5) character set UTF8 COLLEATE utf8_unicode_ci not, `Added set varchar (60) characters by 'UTF8 COLLATE utf8_unicode_ci not', PRIMARY KEY (` order_history_id`)) engine = Maisam AUTO_INCREMENT = 130306 DEFAULT CHARSET = utf8;  

I ever tried this one

  order_history from order_id WHERE Trakkod = "11171920880" Date Date DEDC the LIMIT 1  

but it is also getting order_id, the recently updated tracking code for order_id is '1117192089'

My question has increased one of this .. Its I do not have the solution


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -