Jump to content

Sql query - Zamowienie eksport danych


tiande

Recommended Posts

Witam,

 

PoOtrzebuje wsparcia w napisaniu sql query ktory wyciagnie potrzebne dane z zamowien klientow.

Potrzebuje je do nastepnego kroku a mianowicie eksportu do firmy kurierskiej.

 

Ponizej mam kod ale nie potrafie dodac dodatkowych pol

jak:
- Waga calkowita towaru w zamowieniu
- telefon odbiorcy
- email odbiorcy

 

Jesli ktos wie jak dokonczyc ten kod... bylo by bardziej niz super :)

Dzieki

Stef

 

SELECT
o.`id_order`
,concat( cs.`firstname`,' ', cs.`lastname`) as "Customer"
,concat(ad.`address1`,',',ad.`postcode`,',',ad.`city`,',',ad.`lastname`,',',ad.`firstname`) as "Delivery Address"

FROM `pss_orders` o
join `pss_customer` cs on o.`id_customer`=cs.`id_customer`
join `pss_address` ad on o.`id_address_delivery`=ad.`id_address`

order by`id_order` desc;

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...