Welcome Guest, Not a member yet? Register   Sign In
Joining tables together in a model function
#8

[eluser]Jaketoolson[/eluser]
SELECT *.c FROM ctiteria.c
INNER JOIN tasks t ON t.task_id=c.task_id
INNER JOIN data d ON d.criteria_id=c.criteria_id
WHERE c.task_id = x
AND d.task_id = y
HAVING COUNT(d.qms_id) > 0

gets all from criteria table innerjoins on tasks and data when there are more than 0 results found from table data on qms


Messages In This Thread
Joining tables together in a model function - by El Forum - 02-08-2011, 04:57 PM
Joining tables together in a model function - by El Forum - 02-08-2011, 09:26 PM
Joining tables together in a model function - by El Forum - 02-08-2011, 11:15 PM
Joining tables together in a model function - by El Forum - 02-09-2011, 06:25 AM
Joining tables together in a model function - by El Forum - 02-09-2011, 10:58 AM
Joining tables together in a model function - by El Forum - 02-09-2011, 11:57 AM
Joining tables together in a model function - by El Forum - 02-09-2011, 08:43 PM
Joining tables together in a model function - by El Forum - 02-09-2011, 08:53 PM
Joining tables together in a model function - by El Forum - 02-10-2011, 03:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB