mzellerbach Posted March 18, 2016 Share Posted March 18, 2016 (edited) Dzień dobry bardzo proszę, o informację gdzie mogę znaleźć wykonując polecenie SQL kody paczkomatów (Inpost). Do poniższego zapytania: (właściwie tylko tego brakuje aby nie wchodzić za każdym razem do każdego zamówienia i tracić czas): SELECT d.id_order AS ID_ZAMÓWIENIA, ii.name, CONCAT_WS( ' ', g.firstname, g.lastname ) AS NAZWA_KLIENTA, o.date_upd AS DATA_ZAMÓWIENIA, d.product_name AS PRODUKT, round(d.total_price_tax_incl,2) AS KWOTA_PRODUKTU, round(o.total_shipping,2) AS KWOTA_WYSYLKI, round(o.total_paid_real,2) AS KWOTA_ZAMOWIENIA, CONCAT_WS(' ', ad.address1, ad.address2, ad.postcode, ad.city, ad.other, ad.phone, ad.phone_mobile) AS ADRES_1, CONCAT_WS(' ', ai.address1, ai.address2, ai.postcode, ai.city, ai.other, ai.phone, ai.phone_mobile) AS ADRES_2, g.email FROM ps_order_detail d LEFT JOIN ps_orders o ON ( d.id_order = o.id_order ) LEFT JOIN ps_order_carrier i ON ( o.id_order = i.id_order_carrier ) LEFT JOIN ps_carrier ii ON ( i.id_carrier = ii.id_carrier ) LEFT JOIN ps_customer g ON ( o.id_customer = g.id_customer ) LEFT JOIN ps_stock_available s ON (d.product_id = s.id_product) LEFT JOIN ps_address ad ON (o.id_address_delivery = ad.id_address) LEFT JOIN ps_address ai ON (o.id_address_invoice = ai.id_address) LEFT JOIN ps_group_lang gl ON ( g.id_default_group = gl.id_group ) LEFT JOIN ps_order_state_lang os ON ( o.current_state = os.id_order_state ) WHERE os.id_lang =1 and o.current_state IN (2,3,12) GROUP BY d.id_order, d.product_name ORDER BY d.id_order DESC Edited March 18, 2016 by mzellerbach (see edit history) Link to comment Share on other sites More sharing options...
0 mzellerbach Posted March 22, 2016 Author Share Posted March 22, 2016 (edited) Dzień dobry bardzo proszę, o informację gdzie mogę znaleźć wykonując polecenie SQL kody paczkomatów (Inpost). Do poniższego zapytania: (właściwie tylko tego brakuje aby nie wchodzić za każdym razem do każdego zamówienia i tracić czas): SELECT d.id_order AS ID_ZAMÓWIENIA, ii.name, CONCAT_WS( ' ', g.firstname, g.lastname ) AS NAZWA_KLIENTA, o.date_upd AS DATA_ZAMÓWIENIA, d.product_name AS PRODUKT, round(d.total_price_tax_incl,2) AS KWOTA_PRODUKTU, round(o.total_shipping,2) AS KWOTA_WYSYLKI, round(o.total_paid_real,2) AS KWOTA_ZAMOWIENIA, CONCAT_WS(' ', ad.address1, ad.address2, ad.postcode, ad.city, ad.other, ad.phone, ad.phone_mobile) AS ADRES_1, CONCAT_WS(' ', ai.address1, ai.address2, ai.postcode, ai.city, ai.other, ai.phone, ai.phone_mobile) AS ADRES_2, g.email FROM ps_order_detail d LEFT JOIN ps_orders o ON ( d.id_order = o.id_order ) LEFT JOIN ps_order_carrier i ON ( o.id_order = i.id_order_carrier ) LEFT JOIN ps_carrier ii ON ( i.id_carrier = ii.id_carrier ) LEFT JOIN ps_customer g ON ( o.id_customer = g.id_customer ) LEFT JOIN ps_stock_available s ON (d.product_id = s.id_product) LEFT JOIN ps_address ad ON (o.id_address_delivery = ad.id_address) LEFT JOIN ps_address ai ON (o.id_address_invoice = ai.id_address) LEFT JOIN ps_group_lang gl ON ( g.id_default_group = gl.id_group ) LEFT JOIN ps_order_state_lang os ON ( o.current_state = os.id_order_state ) WHERE os.id_lang =1 and o.current_state IN (2,3,12) GROUP BY d.id_order, d.product_name ORDER BY d.id_order DESC Znalazłem rozwiązanie: SELECT * FROM ps_pakomato_orders jednak kolumna "paczkomat" jest zakodowana base64. Ma ktoś pomysł jak rozkodować te informacje, dla bazy mariadb lub postgres? Edited March 22, 2016 by mzellerbach (see edit history) Link to comment Share on other sites More sharing options...
0 () Maciej () Posted March 23, 2016 Share Posted March 23, 2016 A nie można w drugą stronę, czyli np. zakodować tablice w bazie mariadb do base64 i porównać wartości ? Samo kodowanie / rozkodowanie ręcznie wykonasz np na stronie http://www.devtoolkit.net/pl/tool/base64.html Lub też jak chce Ci się trochę pobawić w pisanie skryptu to możesz skorzystać z materiałów na tej stronie http://konfiguracja.c0.pl/kodowanie_Base64.html Link to comment Share on other sites More sharing options...
Question
mzellerbach
Dzień dobry
bardzo proszę, o informację gdzie mogę znaleźć wykonując polecenie SQL kody paczkomatów (Inpost).
Do poniższego zapytania: (właściwie tylko tego brakuje aby nie wchodzić za każdym razem do każdego zamówienia i tracić czas):
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now