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
> group by product_name
>
> Is there a way to drop this "handcrafted" query to the SQLObject and
> get the result?
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.
Oleg.
--
Oleg Broytman http://phd.pp.ru/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|