Search found 10 matches

Page 1 of 1

Search found 10 matches

Re: Help with writing a query

I have just extended the query to get the product picture as well. No need of a loop I think. Here is it if it might help someone :) $sql = "SELECT order_id, GROUP_CONCAT( CONCAT( '<img width=100 src=http://youropencart/image/', image, '>', '', model, '-' ) , Options, '' ) AS Options1 FROM ( SELECT ...

Jump to post
  • Sun Feb 17, 2013 6:39 pm
  • Replies 12
  • Views 2008
Re: Help with writing a query

I have managed to do the JOIN query. Here is how it looks like SELECT o.order_id, o.name, o.value, GROUP_CONCAT(o.order_id, o.name, o.value SEPARATOR ',') AS Options FROM `order_option` AS o LEFT JOIN `order` AS oo on o.order_id = oo.order_id where oo.order_status_id = 2 group by o.order_id

Jump to post
  • Fri Feb 08, 2013 3:39 pm
  • Replies 12
  • Views 2008
Re: Help with writing a query

well, if it doesnt work that way... I will just write a nasty query :)

Jump to post
  • Thu Feb 07, 2013 5:36 am
  • Replies 12
  • Views 2008
Re: Help with writing a query

Nope, that way shows only the first option row for each order_id

Jump to post
  • Thu Feb 07, 2013 5:26 am
  • Replies 12
  • Views 2008
Re: Help with writing a query

Ok, I am almost there... SELECT * FROM `order` RIGHT JOIN `order_option` on order.order_id=order_option.order_id where order_status_id = 2 group by order_option.order_id but for some reason I am not getting the records grouped by the order_id. Instead I am getting new row for each option What I am m...

Jump to post
  • Thu Feb 07, 2013 3:02 am
  • Replies 12
  • Views 2008
Re: Help with writing a query

Huh, I am not very good at that. I can do an sql query, but not sure how to use the $this->load->model('sale/order');
Any help will be very appreciated.

Thanks.

Jump to post
  • Wed Feb 06, 2013 10:21 pm
  • Replies 12
  • Views 2008
Re: Help with writing a query

Thanks for the answer, I will easy use the Join statement, but the problem that I am facing is that I don't know which are the tables that I have to join... the information for each order is spread in so many tables with unique ID in each table :) What do you mean by "alternatively, use the models t...

Jump to post
  • Thu Jan 31, 2013 2:45 pm
  • Replies 12
  • Views 2008
Help with writing a query

Hello All,

I am trying to write a query that extracts the orders from the db including their id, options and model name.
However, I saw that all this information is spread into multiple tables... so I am stuck now :)

Any help will be very appreciated.

Thanks

Jump to post
  • Tue Jan 22, 2013 7:35 am
  • Replies 12
  • Views 2008
Re: Добавяне на опции на вече създадени продукти

Ами не става така, зашото иска да задам и име на продукта, а то не е еднакво :)

Jump to post
  • Thu Jan 17, 2013 5:29 pm
  • Replies 2
  • Views 1781
Добавяне на опции на вече създадени продукти

Здравейте, Имам следния проблем. имам около стотина продукта в инсталацията който имат опции. Проблема е че трябва да добавя още опции (еднакви) за всички продукти но не виждам начин това да може да се направи от админ панела. Някой да се е сблъсквал с този проблем? Или дали някой не си е написал ск...

Jump to post
  • Mon Jan 07, 2013 6:22 am
  • Replies 2
  • Views 1781

Page 1 of 1

Search found 10 matches