mardi 7 février 2017

A Database Error Occurred Column 'page_id' cannot be null

A Database Error Occurred

Error Number: 1048

Column 'page_id' cannot be null

INSERT INTO st_hit (page_id, hit_time) VALUES (NULL, 1486470765)

Filename:database\DB_driver.php

Line Number: 330

DB_Driver.php

        if ($this->db_debug)
        {
            // grab the error number and message now, as we might run some
            // additional queries before displaying the error
            $error_no = $this->_error_number();
            $error_msg = $this->_error_message();

            // We call this function in order to roll-back queries
            // if transactions are enabled.  If we don't call this here
            // the error message will trigger an exit, causing the
            // transactions to remain in limbo.
            $this->trans_complete();

            // Log and display errors
            log_message('error', 'Query error: '.$error_msg);
            return $this->display_error(
                                    array(
                                            'Error Number: '.$error_no,
                                            $error_msg,
                                            $sql
                                        )
                                    ); **(Line 330)**

Meanwhile if I check on PHPMyAdmin for the table st_hit, the structure shows like this:

enter image description here

Please advice what should I do.

Thanks.




Aucun commentaire:

Enregistrer un commentaire