Re: [SQLObject] manually created query

2010-02-07 Thread Petr Jakeš
>   You can execute the query but you cannot get the results as a list of > SQLObject instances because there are no declarations of columns with sum() > and other expressions. The result will be a list of tuples. > Yes, I know, but sometimes it is OK to get not-object data (some nasty complicate

Re: [SQLObject] manually created query

2010-02-07 Thread Oleg Broytman
On Sun, Feb 07, 2010 at 09:06:42PM +0100, Petr Jake?? wrote: > I would like to query the database something like this: > > select sum(quantity) as qty, product_name, sum(quantity) * price * > (1+tax_rate/100) > FROM `prestashop`.`ps_view_new_order_detail` > where id_order = 1 >

Re: [SQLObject] manually created query

2010-02-07 Thread Sean DiZazzo
> Is there a way to drop this "handcrafted" query to the SQLObject and > get the result? > I think you can use Prestashop._connection.queryAll("SELECT ...") ~Sean -- The Planet: dedicated and managed hosting, cloud stora

[SQLObject] manually created query

2010-02-07 Thread Petr Jakeš
Hi, I have feeling it has been discussed already in the past, but I can not find the answer in the list archive. I would like to query the database something like this: select sum(quantity) as qty, product_name, sum(quantity) * price * (1+tax_rate/100) FROM `prestashop`.`ps_view_new_order