Welcome Guest, Not a member yet? Register   Sign In
Union of two queries for one table
#2

[eluser]toopay[/eluser]
If you use 'LIKE' statement, thats mean your database will only returns match result. You can't get "searched result" and "all result" in a single query. Your option is either, (1)execute two queries or (2)select all of your record, unpack it, grouping it into two different array in your model, pack it again, then send it to your controller.


Messages In This Thread
Union of two queries for one table - by El Forum - 04-25-2011, 07:18 AM
Union of two queries for one table - by El Forum - 04-25-2011, 08:50 AM
Union of two queries for one table - by El Forum - 04-25-2011, 10:11 AM
Union of two queries for one table - by El Forum - 04-25-2011, 11:01 AM
Union of two queries for one table - by El Forum - 04-25-2011, 11:50 AM
Union of two queries for one table - by El Forum - 04-26-2011, 02:26 AM
Union of two queries for one table - by El Forum - 04-27-2011, 12:09 AM
Union of two queries for one table - by El Forum - 04-27-2011, 12:18 AM
Union of two queries for one table - by El Forum - 04-27-2011, 03:02 AM
Union of two queries for one table - by El Forum - 04-27-2011, 05:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB