I still do not understand the zip. Can you explain in english (or
italian ;-) what the tables contain and what you want to show?

On Oct 13, 7:27 pm, Andrew Evans <randra...@gmail.com> wrote:
> Hello ty for replying
>
> this is the function
>
> def indv_product():
>     this_page = request.args(0)
>     product=db(db.product.id == this_page).select(db.product.ALL)
>     product_e=db(db.product_extended.product ==
> this_page).select(db.product_extended.ALL)
>     userstuff=db(db.user_extended.userinfo ==
> db.product.userinfo).select(db.user_extended.ALL)
>     return dict(product=product,product_e=product_e,userstuff=userstuff)
>
> I use a link
>
> {=A(row.product_name,
> _href=URL('display', 'indv_product', args=row.id))}}
>
> then call the values of data
>
> {{for stuff, products in zip(userstuff, product):}}
>
> {{=stuff.country}}
>
> {{=products.category}}
>
> the value passed to products but the values being passed to stuff return the
> first entry in the db not sure what I am doing wrong cause I had it working
> before
>
> Maybe not...
>
> Cheers on the advice :D
>
> On Wed, Oct 13, 2010 at 11:46 AM, mdipierro <mdipie...@cs.depaul.edu> wrote:
> > I think you want this:
>
> > product= db.product(this_page)
> > userstuff=db(db.user_extended.userinfo==product.userinfo).select()
>
> > But I am not sure. Can you explain us more?
>
> > On Oct 13, 11:13 am, Andrew Evans <randra...@gmail.com> wrote:
> > > How can I make these two queries into one cause when I use them in my
> > view
> > > (htmll) it doesn't work as expected
>
> > > product=db(db.product.id == this_page).select(db.product.ALL)
>
> > > userstuff=db(db.user_extended.userinfo ==
> > > db.product.userinfo).select(db.user_extended.ALL)
>
> > > this is what I am doing
>
> > > {{for stuff, products in zip(userstuff, product):}}
>
> > > if anyone has suggestions on how I can get this to work. Currently the
> > user
> > > stuff value always returns the first entry in the db regardless of which
> > > user I select
>
> > > Any ideas
>
> > > *cheers
>
> > > Andrew
>
>

Reply via email to