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/            p...@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to