Codeigniter error session DB

前端 未结 5 1631
南旧
南旧 2020-12-15 06:23

After upgrade Codeigniter to version 3.0 I get error DB after trying call any controller:

Error Number: 1064

You have an error in your SQL syntax; check the         


        
5条回答
  •  感情败类
    2020-12-15 07:27

    I had this same problem and it took me a while to find the solution. On the surface, the instructions tell you to just load the session driver and everything is cool, but if you look down in the Database Driver section of the CodeIgniter documentation, you find that you need to configure the $config[‘sess_save_path’] variable in your config.php file. For example:

     $config[‘sess_save_path’] = ‘ci_sessions’
    

    http://www.codeigniter.com/userguide3/libraries/sessions.html#initializing-a-session

    Of course, you have to have the ci_sessions table set up in your database as well, but this solved the missing table name for me.

提交回复
热议问题