CodeIgniter Forums

Full Version: 2 table results inside a single model function
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]max123[/eluser]
Is it possible to return 2 query results in a single model function. That means i want to take 2 result sets from 2 related tables by using a single model function. Is it possible?

El Forum

[eluser]imn.codeartist[/eluser]
store each query result in the array and return it as combined result

El Forum

[eluser]rogierb[/eluser]
Or use the sql UNION operator to combine two queries

see http://www.w3schools.com/sql/sql_union.asp for more info.