PDA

View Full Version : install.php file


flup
04-30-2003, 03:02 PM
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

flup
04-30-2003, 03:04 PM
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-

flup
04-30-2003, 03:05 PM
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.

flup
04-30-2003, 03:17 PM
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

flup
04-30-2003, 07:22 PM
I'm bussy with this as a stand-alone script now

flup
04-30-2003, 09:03 PM
^^ Important :(

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.

flup
05-01-2003, 11:14 AM
Ok, i'll just do it vB right away.

flup
05-01-2003, 11:19 AM
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");

flup
05-01-2003, 11:25 AM
THe script will fully run on the vBulletin replacement sets

flup
05-01-2003, 12:00 PM
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
:?

flup
05-01-2003, 12:07 PM
Well, for now i've done it with phpmyadmin.

mr e
05-01-2003, 05:06 PM
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.

flup
05-01-2003, 05:27 PM
???

flup
05-01-2003, 05:32 PM
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?

flup
05-01-2003, 05:32 PM
Nevermind, you left $tabel away......smart ;)
Now it does it directly hehe :)

mr e
05-01-2003, 11:08 PM
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

flup
05-02-2003, 07:55 AM
Aaaaaaaaaaah Colicab, you're tha best :D

flup
05-02-2003, 07:57 AM
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.

flup
04-21-2004, 10:59 AM
Why bring up old topics...