View Full Version : deleted table in dB
I accidentally deleted my visitors table in my database. I figure now would be a good time to upgrade to 1.4. Is there a way to get the table back or create a new visitors table? I can get to the admin though the browser but cannot get my pictures to show.
Thanks,
Earl
Connie
10-19-2005, 07:44 PM
Earl, this is the installing code for PP 1.4.x or PP 1.3
so you might reconstruct the table, but when you upgarde to 1.4.2 you might see that then when installing / upgrading the table will be created as well ("create table if not exists")
so no big problem! Good luck!
if you run PP 1.4.2
// Visitors table
mysql_query("
CREATE TABLE IF NOT EXISTS {$prefix}visitors (
id int(11) NOT NULL auto_increment,
datetime datetime NOT NULL default '0000-00-00 00:00:00',
host varchar(100) NOT NULL default '',
referer varchar(255) NOT NULL default '',
ua varchar(255) NOT NULL default '',
ip varchar(255) NOT NULL default '',
ruri varchar(150) NOT NULL default '',
PRIMARY KEY (id)
)
") or die("Error: ". mysql_error());
echo "table {$prefix}visitors created...<p />";
}
if you run PP 1.3:
CREATE TABLE ".$prefix."visitors (
id int(11) NOT NULL auto_increment,
datetime datetime NOT NULL default '0000-00-00 00:00:00',
host varchar(100) NOT NULL default '',
referer varchar(255) NOT NULL default '',
ua varchar(255) NOT NULL default '',
ip varchar(255) NOT NULL default '',
ruri varchar(150) NOT NULL default '',
PRIMARY KEY (id)
One more thing and please forgive my ignorance. How is this code ran? - In mySQL? I'll give it a try tonight.
Thanks Connie - you rock!
Connie
10-20-2005, 06:35 AM
I took this code from our install routine
but in it you find exactly the SQL which you might need to enter in PHPAdmin for example
but: if you want to upgrade, the install routine of the new version will create the table itself if it does not exist...
so just do an upgrade
I must of done something wrong. No table was created. I suppose it's not important anyway - only for stats? Thanks for all your help. PP1.4.2 installed any running at any rate!
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.