严重性:通知消息:未定义偏移量:0文件名:helpers / ssp_helper.php行号:302

时间:2018-12-20 12:12:22

标签: php codeigniter ssp

刷新页面时我正在获取数据,但不知道y一旦我搜索特定数据就会出现此错误,此代码是否有任何错误

错误

  

严重性:通知消息:未定义的偏移量:0文件名:helpers / ssp_helper.php行号:302

这是我的模型/sspmodel.php

function userportalupdateincorrectSSP()
{

            $filterQuery = $this->constructFilterQueryIncorrectPortalUpdate( $_POST['fromDateId'], $_POST['toDateId'], $_POST['appCode']);

            // DB table to use
            $table = 'user_logs_signedusers` `us`';
            $table .= " LEFT JOIN(SELECT `User_Id` as `UUser_Id`, `Name`, `Executive_Id` from `user_accounts` as `ua` where `Status` != '4' AND `Status` != '5') `ua` on `ua`.`UUser_Id` = `us`.`User_Id`";
            $table .= " LEFT JOIN(SELECT `id` , `firstname` from `admin_admin` ) `a` on `a`.`Id` = `ua`.`Executive_Id";


            // Table's primary key
            $primaryKey = 'User_Id';

             $whereQuery = " AND `Event` LIKE 'PortalUpdate_Incorrect_ID/Pass' GROUP BY `us`.`User_Id` ";       


            $columns = array(
                    array( 'db' => '`us`.`User_Id`',            'dt' => 0, 'columnName' =>'User_Id'),
                    array( 'db' => '`Name`',                'dt' => 1, ),
                    array( 'db' => '`Username`',            'dt' => 2 ),
                    array( 'db' => '`App_Id`',              'dt' => 3 ),
                    array( 'db' => '`Event`',               'dt' => 4 ),
                    array( 'db' => "DATE_FORMAT(`Date_Created`,'%d-%b-%Y %H:%i') ",  'dt' => 5, 'columnName' => 'Date_Created'),
                    array( 'db' => '`firstname`',               'dt' => 6 ),
                    array( 'db' => '`VName`',               'dt' => 7 ),
                    );

            return Ssp_helper::complex( $_POST, $this->sql_details, $table, $primaryKey, $columns, null, $filterQuery.$whereQuery);
        }

        function constructFilterQueryIncorrectPortalUpdate($appCode,$fromDateId,$toDateId){

            $query = "";

            // From To Date Query for Updation Date
            $currentDateTime = date('Y-m-d H:i:s', time());
            $fromDateId      = date('Y-m-d H:i:s', strtotime('0 days', strtotime($fromDateId)));
            $toDateId        = date('Y-m-d H:i:s', strtotime('+ 1 days', strtotime($toDateId)));

            if(($_POST['fromDateId'] && $_POST['toDateId']) != ''){

                $query = " Date_Created >= '".$fromDateId."' AND Date_Created <= '".$toDateId."' ";
                } 
                else{
                    $query = " Date_Created <= '".$currentDateTime."'  ";
                }

            //Apps Filter Query
            if($_POST['appCode'] != ""){
                switch($_POST['appCode']){
                    case 1: $query .= " AND App_Id LIKE '%".$_POST['appCode']."%' ";  break;
                    default: $query .= " AND App_Id LIKE '%".$_POST['appCode']."%' ";
                }
            }

                return $query;
        }

这是我的控制器部分,

function requestUserreLoginSignedUsersListAjax(){


        $resultSet = $this->ssp_model->userportalupdateincorrectSSP();

        echo json_encode($resultSet);
}

0 个答案:

没有答案