Welcome Guest, Not a member yet? Register   Sign In
Mysql get values from table with join (or and) ?
#1

Hi i have the following tables

table buddies |id|b1|b2|status|

(note status = 0/1/2 pending/accepted/blocked) also b1 always is the userid sending the request.

table messages |id|userid|message|

table accounts |userid|name|email|

basically id like to show all messages from 'table messages' that have a buddies status on 1 and are my buddies knowing that in 'table buddy' my userid can be in either b1 or b2 (not in both at the sames time) depending if i request or buddy has requested .

hope im clear on this

thanks
Reply


Messages In This Thread
Mysql get values from table with join (or and) ? - by Marcel - 02-26-2015, 01:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB