Using query data in a new query in a model - Joomla! Forum - community, help and support


hello fellow joomla users.

im developing component have bit of dilemma.
im converting regular php script joomla component. using 2 major queries results on screen. first query gets al different locations have. second query gets telephonenumbers have @ location. second query uses data gererated first.

example:
select location locations --> $result
select telephonenumbers telephonenumberlist location = $result

im doing in php script using nested foreach. love see beter solution in joomla.
currently have model function returns of locations , view prints them on screen.
now have function somehow uses results first function in second one, returns result , prints them.
i havent been able come solution far hope yall can me on way?

greetings dave

this not joomla issue @ all. need add join select query , results want in 1 query. still need use foreach() possibly on 1 level.

the mysql reference manual has syntax details of select join statements: http://dev.mysql.com/doc/refman/5.0/en/join.html





Comments

Popular posts from this blog

Joomla site hacked, cant see front and - Joomla! Forum - community, help and support

Christian Home School Programs - Joomla! Forum - community, help and support

Trouble with PF_OutFlag_I_USE_AUDIO and PF_CHECKOUT_LAYER_AUDIO