Jump to content
ugintl

Database error

Recommended Posts

I uploaded website files to the web root and when i tried to access it via www.mydomain.com it gave following error

 

A Database Error Occurred

Error Number: 1146

Table 'webpk_16901224_app.sesion' doesn't exist

INSERT INTO `sesion` (`session_id`, `ip_address`, `user_agent`, `last_activity`, `user_data`) VALUES ('1912dd6c2dd5c411cde798d9496c9a9a', '119.157.163.66', 'Mozilla/5.0 (Windows NT 5.1; rv:42.0) Gecko/20100101 Firefox/42.0', 1448544788, '')

Filename: libraries/Session.php

Line Number: 328

 

I tried to create a table like following through phpmyadmin, but i get an error "key id does not exist". My database name is webpk_16901224_app and it is empty. There are no tables.

 

create table tablename(
id INT NOT NULL,
name VARCHAR (20) NOT NULL,
age INT NOT NULL,
PRIMARY KEY (id)
);

 

The website script has 3 sql files, but i don't know how to use them. SQL files are attached.

Desktop.zip

Share this post


Link to post
Share on other sites

In phpmyadmin select database 'webpk_16901224_app' and select create database table add name 0f table as 'sesion' and select how many columns you require (6 = 'id' and fields used in insert 'session_id`, `ip_address`, `user_agent`, `last_activity`, `user_data`) the text must match exactly ie uppercase, lowercase and underscore used, id should be int, not null AND auto_increment, length is upto you, yhe rest can char with appropriate length to take value, and set id as primary key when saved.

 

Once you know this works you can export to back it up, drop the table to recreate it manually, and view the backup file to gain experience on how it was created.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×