Note that there are some explanatory texts on larger screens.

plurals
  1. POError 1054 in Codeigniter 2.1.3
    primarykey
    data
    text
    <p>I have the 1054 error in Codeigniter and I don't know why. I want to create a login form and check if the user is logged or not.</p> <p>But I only create a simple view and controller and the following error is displayed:</p> <pre><code>Error Number: 1054 Unknown column 'user_data' in 'field list' INSERT INTO `ci_sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`, `user_data`) VALUES ('c392322ac31b7fac1c2d79cfbde9edf7', '127.0.0.1', 'Opera/9.80 (Windows NT 6.1) Presto/2.12.388 Version/12.15', 1368010716, '') Filename: C:\wamp\www\..\system\database\DB_driver.php Line Number: 330 </code></pre> <p>I only created the table session with this script:</p> <pre><code>CREATE TABLE IF NOT EXISTS `ci_sessions` ( session_id varchar(40) DEFAULT '0' NOT NULL, ip_address varchar(45) DEFAULT '0' NOT NULL, user_agent varchar(50) NOT NULL, last_activity int(10) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY (session_id) ); </code></pre> <p>The view:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;Anuncios&lt;/title&gt; &lt;link rel="stylesheet" href="/Pruebas/css/estilos.css" type="text/css" media="screen"/&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="contenedor"&gt; &lt;div id="menu"&gt; &lt;label for="home" id="inicio"&gt;&lt;a href="http://localhost/Pruebas/index.php/ cindice/"&gt;Inicio&lt;/a&gt;&lt;/label&gt; &lt;label for="acceso" id="login"&gt;&lt;a href="http://localhost/Pruebas/index.php/ cindice/publicar"&gt;Publicar anuncio&lt;/a&gt;&lt;/label&gt; &lt;label for="reg" id="registro"&gt;&lt;a href="http://localhost/Pruebas/index.php/ cindice/registro"&gt;Registro&lt;/a&gt;&lt;/label&gt; &lt;label for="empresa" id="sobrempresa"&gt;&lt;a href="http://localhost/Pruebas/ index.php/cindice/sobempresa"&gt;Sobre nosotros&lt;/a&gt;&lt;/label&gt; &lt;label for="contacto" id="contactar"&gt;&lt;a href="http://localhost/Pruebas/ index.php/cindice/contacto"&gt;Cont&amp;aacute;ctanos&lt;/a&gt;&lt;/label&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>The controller:</p> <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Cindice extends CI_Controller { function __construct() { parent::__construct(); } public function index() { $this-&gt;load-&gt;view('indice'); } public function publicar() { echo "Aqu&amp;iacute; se publica el anuncio"; } public function acceso() { echo "Esto es el acceso"; } } ?&gt; </code></pre> <p>How can I fix this issue?</p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload