how to apply two different queries in different dates php
<p>i have a table like this </p>

<pre><code>+-----------------------------------------------------------------+
|                              seeker                             |
+----+-------+----------+---------------+-------------------------+
| id | name  | password | register_date | login_date | limit_date |
+----+-------+----------+---------------+------------+------------+
| 01 | ali   |   ****   |  2012-02-08   | 2012-02-09 | 2012-03-09 |
| 02 | hamza |   ****   |  2012-04-10   | 0000-00-00 | 0000-00-00 |
| 03 | sam   |   ****   |  2012-04-15   | 0000-00-00 | 0000-00-00 |
+----+-------+----------+---------------+------------+------------+

register_date = when user ger registered
login-date= when user attempt to login
limit date= login-date + 1 month
</code></pre>

<p>now i have to apply two different delete query 
one for user who register and login "ali"
one for user who only register but didnot attempt to login "hamza, sam" and have login-date='0000-00-00'</p>

<p>i am using <code>if-statment</code> like this</p>

<pre><code> $qry="select * from seeker where login_date='0000-00-00'";
    $rs= mysql_query($qry, $con);
    $res=mysql_fetch_array($rs);

    if($res==0)
    {
      //query to delete user who has login date
      $q= "delete from seeker where current_date = limit_date'";
      if($rq=mysql_query($q, $con));
      echo "$q";

    }

   else if($res!=0)
    {
        //query to delete user who didnot login and has login-date='0000-00-00'
        $qry1="delete from seeker where '$days' &gt;= 30";
            $rs1= mysql_query($qry1, $con);
            echo $qry1;
    }
</code></pre>

<p>i am very confused and <code>making some mistake in if-statment</code> i guess. 
when i run this code it executes only <code>else if</code> . it should also execute <code>first if</code> because both conditions occurs according to my database</p>
