mysql - Selecting from a second bd_table based on array results PHP -


Please be patient with this question because I am quite new to PHP (except for contact form and login form etc).

event_id, event_name, event_time, etc, etc.

Then I have a table (event_followers) for the follower of the event: < / P>

  event_id | User_id event_id | User_id event_id | User_id   

Whatever event I need is to select all the events that are following a particular user and show it as an array and then any kind of incidents Can any array / result be done in any way to get specific information about it?

I'm sorry, if this is the basic php, but as I said I am very new to this. Thanks

Try this:

  $ query = mysqli_query ("SELECT * Event_followers.event_id = events.event_id WHERE event_followers.user_id = '. $ User_id ") on fol as events LEOTH event_followers from events; While ($ line = mysqli_fetch_assoc ($ query)) {print_r ($ line); }   

mysql * functions has been deprecated, so use of mysqli _ * or PDO But I am not good on that, so I wrote the code in mysql .

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -