Hi, i have a count problem.
I have two queries. assets = db((db.asset.asset_class_id == asset_class_id) & (db.asset_value.asset_id == db.asset.id) & (db.asset_value.location_value == location_id)).select(db.asset.ALL, orderby=~db.asset.id, limitby=limit_by, groupby=db.asset.id) number_of_records = db((db.asset.asset_class_id == asset_class_id) & (db.asset_value.asset_id == db.asset.id) & (db.asset_value.location_value == location_id)).count(distinct=True) If i turn off distinct i get number_od_records = 3, if i turn on distinct then i get number_od_records = 1, but asset returns 2 records with the same conditions. What am i doing worng? -- --- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.