渡された変数を使用して関数を呼び出そうとしていますが、機能していません。
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;
}
上記のコードでは、関数を呼び出していますが、機能after_del($uid,$msg_id,'wall_post');
していません
after_del 関数は
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();