News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Add a table into MySQL.

Started by PetruZ, March 02, 2011, 03:23:22 PM

Previous topic - Next topic

PetruZ

Hello, I got a problem with a sql table named: smf_sessions
I accidentally deleted that table and I'm wondering how I can add it. I'm not a pro with MySQL and need help.
And now I get this (obviously): Table 'b7_7320001_forum1.smf_sessions' doesn't exist.
When I try to join my site.

Thank you.
-PetruZ

CapadY

Try it with next SQL query, don't forget to change the db_prefix.


CREATE TABLE {$db_prefix}sessions (
  session_id char(32) NOT NULL,
  last_update int(10) unsigned NOT NULL,
  data text NOT NULL,
  PRIMARY KEY (session_id)
) ENGINE=MyISAM;

Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

PetruZ

#2
Change db_prefix to what? :S

Arantor

Well, whatever the rest of your tables are - judging by the error message the prefix is smf_

PetruZ

How should it look like?I've tried: CREATE TABLE {smf_}sessions (
AND 
CREATE TABLE {$smf_}sessions (

And where should I put it?
As of everyones notice, I'm not good with SQL..

Arantor


PetruZ

Thanks alot!! It worked :) Problem solved.

For people that searched to get here, I added it into the bar where it says "SQL".

Advertisement: