Welcome Guest, Not a member yet? Register   Sign In
Using model functions in View
#4

[eluser]Zorancho[/eluser]
What about this kind of SQL statement?
$sql = "SELECT c.name, c.email, DISTINCT(d.dname) FROM client c LEFT JOIN domain d ON c.id = d.client_id";

This way you will select name and email from client and no duplicate results for domain name.


Messages In This Thread
Using model functions in View - by El Forum - 09-20-2009, 07:12 AM
Using model functions in View - by El Forum - 09-20-2009, 07:19 AM
Using model functions in View - by El Forum - 09-20-2009, 08:14 AM
Using model functions in View - by El Forum - 09-20-2009, 08:29 AM
Using model functions in View - by El Forum - 09-20-2009, 09:22 AM
Using model functions in View - by El Forum - 09-20-2009, 11:59 AM
Using model functions in View - by El Forum - 09-20-2009, 02:36 PM
Using model functions in View - by El Forum - 09-20-2009, 03:42 PM
Using model functions in View - by El Forum - 09-20-2009, 05:58 PM
Using model functions in View - by El Forum - 09-20-2009, 06:41 PM
Using model functions in View - by El Forum - 09-20-2009, 07:52 PM
Using model functions in View - by El Forum - 09-21-2009, 01:31 AM
Using model functions in View - by El Forum - 09-21-2009, 06:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB