View Full Version : install.php file
Can someone make one for me? it seems not to be working for me.
This has to be created:
CREATE TABLE ladder(
id int NOT NULL auto_increment,
clanname varchar(50) NOT NULL,
clantag varchar(10) NOT NULL,
leader varchar(30) NOT NULL,
email varchar(40) NOT NULL,
website varchar(50) NOT NULL,
irc varchar(25) NOT NULL
Currently this is my php code:
<?
require("config.php");
mysql_connect($dbhost,$dbuser,$dbpass) or die("<font color=#cc0000>The information in config.php does not aply to the selected database, please chech your enrty</font>");
//Creating tabel members
$tabel = mysql_query("CREATE TABLE ladder(
id varchar(100) NOT NULL auto_increment,
clanname varchar(50) NOT NULL,
clantag varchar(10) NOT NULL,
leader varchar(30) NOT NULL,
email varchar(40) NOT NULL,
website varchar(50) NOT NULL,
irc varchar(25) NOT NULL
)");
mysql_db_query($dbname, $tabel) or die("<font color=#cc0000>Failed to set up tabel -members-</font>");
echo "<font color=green>Tabel -ladder- has been set up correctly!</font><br>";
?>
It only says: failed to set up table -ladder-
It seems to connect good to the database. else it would show me a DIE error....
colicab-d
04-30-2003, 03:12 PM
yeah i had this problem ages ago it connected ok but never inserted new tables.
and how did you solved it ?
Dean C
04-30-2003, 06:10 PM
You don't need to connect to the db as that's all done for you once including global.php :)
- miSt
I'm bussy with this as a stand-alone script now
Dark_Wizard
05-01-2003, 12:21 AM
Today at 04:22 PM flup said this in Post #7 (https://vborg.vbsupport.ru/showthread.php?postid=389549#post389549)
I'm bussy with this as a stand-alone script now
Why? This is a vBulletin forum so why don't you make it so it works with it....also, why are you worrying about an install script if you haven't completed the project? The install piece comes last.
Ok, i'll just do it vB right away.
Yesterday at 08:10 PM Mist said this in Post #6 (https://vborg.vbsupport.ru/showthread.php?postid=389512#post389512)
You don't need to connect to the db as that's all done for you once including global.php :)
- miSt
So in the config.php file (wich is going to be stored in the mainforum folder) i could do:
include("./global.php");
THe script will fully run on the vBulletin replacement sets
I just was trying the mainpage to show up.
So i first had to run the install.php file, now, i've changed:
or die("echo .....")
to
or die(mysqL_error());
and it reply\s with:
Query was empty
:?
Well, for now i've done it with phpmyadmin.
try this, not sure if it'll work, but hey :)
<?
require("config.php");
mysql_connect($dbhost,$dbuser,$dbpass) or die("<font color=#cc0000>The information in config.php does not aply to the selected database, please chech your enrty</font>");
mysql_select_db($dbname) or die("Could not select database");
//Creating tabel members
mysql_query("CREATE TABLE ladder(
id varchar(100) NOT NULL auto_increment,
clanname varchar(50) NOT NULL,
clantag varchar(10) NOT NULL,
leader varchar(30) NOT NULL,
email varchar(40) NOT NULL,
website varchar(50) NOT NULL,
irc varchar(25) NOT NULL
)") or die('couldnt make table');
?>
filburt1
05-01-2003, 05:07 PM
Apply has two Ps.
Today at 07:06 PM mr e said this in Post #15 (https://vborg.vbsupport.ru/showthread.php?postid=390048#post390048)
try this, not sure if it'll work, but hey :)
<?
require("config.php");
mysql_connect($dbhost,$dbuser,$dbpass) or die("<font color=#cc0000>The information in config.php does not aply to the selected database, please chech your enrty</font>");
mysql_select_db($dbname) or die("Could not select database");
//Creating tabel members
mysql_query("CREATE TABLE ladder(
id varchar(100) NOT NULL auto_increment,
clanname varchar(50) NOT NULL,
clantag varchar(10) NOT NULL,
leader varchar(30) NOT NULL,
email varchar(40) NOT NULL,
website varchar(50) NOT NULL,
irc varchar(25) NOT NULL
)") or die('couldnt make table');
?>
Ok, thx, it works, but what exactly did you do?
Nevermind, you left $tabel away......smart ;)
Now it does it directly hehe :)
i took out mysql_db_select as it is depreciated and added in mysql_select_db right after you connect
colicab-d
05-02-2003, 12:40 AM
hope this helps
https://vborg.vbsupport.ru/showthread.php?s=&threadid=52444
:D
Aaaaaaaaaaah Colicab, you're tha best :D
I'm going to make it something more easier for the people wich are just something "Noober" :)
jluerken
04-21-2004, 10:24 AM
I'm going to make it something more easier for the people wich are just something "Noober" :)
Don't forget to user a variable for the table prefixes. The ladder table should use a prefix if someone installed the vb3 tables with using one.
Why bring up old topics...
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.