MySQL Forums
Forum List  »  Newbie

Query problem : get users and a list of other info in another table
Posted by: Bertrand Armedec
Date: October 08, 2018 04:45AM

Hi guys,
I might need a bit of help with a query.
It doesn't sound difficult but I can't figure out how to do it.

I have a "classic" user system, add/loggin/logout/delete... and every user once logged can add a GPS marker using a button. I am using another table to store those locations with the user's id as reference.


Here are the tables :

USERS
id email name ...

LOCATIONS
id user_id lat lng time ...


I need to select every users and at the same time select all the related locations for each user. I will have to do a join for sure.

I was hoping I could get a SQL answer like :

id email name (an array of the locations for this particular user, or to concat every locations then in php split into an array)


If you have an idea I will be so glad to ear :)

Cheers!

Options: ReplyQuote


Subject
Written By
Posted
Query problem : get users and a list of other info in another table
October 08, 2018 04:45AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.