So i wanna pairing users only in PHP:First, get one avaliable user id //right now not random\[code\]mysql_query('SELECT id FROM users WHERE state="0" LIMIT 1'); //state 0 = user avaliable, 1 = talking/playing with someone\[/code\]$available_id = stuffs to get id from queryAnd then update:\[code\]$result = mysql_query('UPDATE INTO users SET state="1" WHERE (id=$available_id OR id=$my_id) AND state="0"');\[/code\]if \[code\]$result == false\[/code\] then it mean that no one row has updated. So back to First step,
if \[code\]$result == true\[/code\] then what? it can mean that my row has updated or available user, or both. I am confused how to done with it.
if \[code\]$result == true\[/code\] then what? it can mean that my row has updated or available user, or both. I am confused how to done with it.