php: Adding status 2
<p>Anyone can help me with this, i have here status 0 and status 1 now </p>

<p><strong>Status 0</strong>: Not my friend</p>

<p><strong>Status 1</strong>: My friend</p>

<p>And i need</p>

<p><strong>Status 2</strong>: ADDED TO FRIEND LIST (we send friend request but row status is 0)</p>

<p>Please check query bellow...</p>

<pre><code>&lt;? 
$query = "SELECT * 
            FROM friends 
           WHERE (idusers={$_SESSION[userid]} 
                 AND idusers_friend={$row[ID]}) 
                 AND status='1' OR (idusers={$row[ID]} 
                 AND idusers_friend={$_SESSION[userid]} 
                 AND status='1' )";
$result = mysql_query($query);
$check_exist = mysql_num_rows($result);
if($check_exist &gt;= 1) { ?&gt;

 STATUS 1 - SEND A MESSSAGES (friend)

&lt;? } elseif($check_exist == 0) { ?&gt; 

 STATUS 0 - ADD AS FRIND (not friend)

&lt;? } ?&gt;
</code></pre>

<p>What i need now, i need to have <strong>status 2</strong> , example above you can see im make now if users is my frind i can send a messages to this user, is not in my frind list i have button to add it, but when i click to add as frind im send request (something like on facebook) and than this is status 2, waiting for accept.</p>

<p><em>Example:</em> If i have this user as my frind Status in database is 1, is not in my list database is empty, if im send request row status is 0 and whan 2nd user accept request status will be changed to 1.</p>
