在非对象上调用成员函数processqueue()

时间:2014-06-19 20:44:06

标签: php mysql

我试图运行此文件,此文件发送电子邮件和更新表等(各种任务)。 但是,我收到了这个错误 致命错误:在第14行的/home/novosctn/public_html/user/cron_email_handler.php中调用非对象的成员函数processqueue()

我在这里经历了各种各样的问题,但没有一个能帮助我。 我做错了什么?

任何建议都表示赞赏。

数据库结构

indexid(int unsigned) others
1                       xyz
2                       asa

该文件。

<?php
include 'dbconnector.php';
include 'class/class.user.php';
//this file would loop through the Queued rows in the messagequeue and process them.
//first, get all the unprocessed queue.
try
{
    $statement = $conn->query("SELECT * from messagequeue where currentstatus = 'Queued'");
    $statement->setFetchMode(PDO::FETCH_OBJ);
    while($q = $statement->fetch())
    {
        //now process
        if($user->processqueue($q->indexid))
        {
            //$user->notifyAdmin();
            //$user->notifyUser();
            $i=2;
            //notify admin of a successful queue complete
            //notifyuser that a particular queue was not completed.
            echo $q->indexid . "was completed";
        }
        else
        {
            $i=1;
            //the particular que was not completed.
            //notify admin about this
            echo $q->indexid . "was not completed";
        }
    }
}
catch(PODException $e)
{
    echo $e->getMessage();
}
?>

0 个答案:

没有答案