thraxil.org:

Reply to: raw queries with SQLObject

Thanks a lot for this! Im pretty new to python, sqlobject and sql and while practicing I am stuck on how to return specific columns from different tables using sqlobject 'queries' (ie i need something like select product.id, product.name, product.variant, stock.quantity, price_log.price, price_log.price*stock.quantity AS amount from stock,product,outlet,price_log where outlet.name = 'MAIN' AND outlet.id = stock.outlet_id AND product.id = stock.product_id AND price_log.product_id = product.id AND price_log.current = True ). Though I am not sure if I will be able to find the sqlobject way soon. At least for now I get to solve the problem at hand.


formatting is with Markdown syntax. Comments are not displayed until they are approved by a moderator. Moderators will not approve unless the comment contributes value to the discussion.

namerequired
emailrequired
url
remember info?