I want data to be captured for tdr_bid_unrev_detls.rate. I have the query
below.
select d.jcod,d.qty,u.rate,u.amt
from tdr_tender_master t join amc_master m on t.amc_id = m.id
join amc_details d on m.id = d.amc_id
left join tdr_bid_unrev_detls u on u.tdr_id = t.id and u.amc_id = m.id
where m.id = 15
This returns the result
jcod qty rate amt
--------------------------------------------
cs001 10.00 NULL NULL
cs010 10.00 NULL NULL
cstest 10.00 NULL NULL
cs002 10.00 NULL NULL
asd 2.00 NULL NULL
cs004 5.00 NULL NULL
test1 10.00 NULL NULL
Now I would like to fill the rate in the above result in a grid generated
by the above query.
I tried this in controller
tdrid = request.vars.tdrid
query = (db.tdr_tender_master.id==tdrid) & (db.tdr_tender_master.amc_id ==
db.amc_master.id) & (db.amc_master.id == db.amc_details.amc_id) &
(db.tdr_bid_unrev_detls.tdr_id == db.tdr_tender_master.id)
left=db.tdr_bid_unrev_detls.on(db.tdr_tender_master.id ==
db.tdr_bid_unrev_detls.tdr_id)
form = SQLFORM.grid(query,left=left)
but i dont get the required form. I want to populate the
tdr_bid_unrev_detls table. I am not able to do it myself reading the book.
So pl. help. Thanks and regards.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.