Welcome Guest, Not a member yet? Register   Sign In
MySQL question: 2 queries in 1
#1

[eluser]codex[/eluser]
Imagine 2 tables: 1) tbl_user and 2) tbl_user_hobbies.

Normally you (or at least I) would do a query to get all users and with the results I would make a loop to query the hobbies associated with the users. But is it possible to do it in one query, for instance with a subquery or join? And if so, how would one do this?

The question is really: is it technically possible?


Messages In This Thread
MySQL question: 2 queries in 1 - by El Forum - 11-05-2007, 10:52 AM
MySQL question: 2 queries in 1 - by El Forum - 11-05-2007, 10:57 AM
MySQL question: 2 queries in 1 - by El Forum - 11-05-2007, 10:58 AM
MySQL question: 2 queries in 1 - by El Forum - 11-05-2007, 11:12 AM
MySQL question: 2 queries in 1 - by El Forum - 11-05-2007, 12:08 PM
MySQL question: 2 queries in 1 - by El Forum - 11-05-2007, 12:23 PM
MySQL question: 2 queries in 1 - by El Forum - 11-05-2007, 02:12 PM
MySQL question: 2 queries in 1 - by El Forum - 11-05-2007, 03:12 PM
MySQL question: 2 queries in 1 - by El Forum - 11-05-2007, 03:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB