call a function inside a public function in php
<p>I am trying to call a function with variables passed, but it's not working. </p>

<pre><code>public function Delete_Update($uid, $msg_id) 
{
    $sql = mysql_query("select uploads_grab from messages where msg_id='$msg_id' and uid_fk='$uid'");
    $roww = mysql_fetch_array($sql);
    $uploads_grab_id=$roww['uploads_grab'];
    if ($uploads_grab_id != '0') {
        $sq = mysql_query("delete from user_uploads_grab where id='$uploads_grab_id'");
    }

    $query = mysql_query("DELETE FROM `comments` WHERE msg_id_fk = '$msg_id' and cfid='$uid' ") or die(mysql_error());
    $query = mysql_query("DELETE FROM `messages` WHERE msg_id = '$msg_id' and uid_fk='$uid'") or die(mysql_error());

    after_del($uid,$msg_id,'wall_post');
    return true;           
}
</code></pre>

<p>In the above code I am calling a function <code>after_del($uid,$msg_id,'wall_post');</code> but it's not working </p>

<p>the after_del function is</p>

<pre><code>class delme
   {
      function after_del($uid,$delid,$type)
      {

        $sql=mysql_query("select created from messages where msg_id='$delid' and uid_fk='$uid'");
        $roww=mysql_fetch_array($sql);
        $created=$roww['created'];
        $del_noti = mysql_query("DELETE FROM `notification` WHERE time_stamp = '$created' and owner_user_id='$uid'") or die(mysql_error());
        $del_activity = mysql_query("DELETE FROM `activity` WHERE time_stamp = '$created' and owner_user_id='$uid'") or die(mysql_error());         


      }

      }
$del_result=new delme();
</code></pre>
