Hey Leute!
Jetzt steh ich wiedermal auf dem Schlauch! :puzz
require_once("config.php");
require "modules/$module_name/_config.inc.php";
$db = @mysql_connect("$dbhost,$dbuname,$dbpass");
if($db){
global $prefix;
mysql_select_db($dbname,$db);
$result = mysql_query("create table ${prefix}_" . $ticketsystem_id . "tickets (id int(50), time int(10), name varchar(80), email varchar(80), url varchar(80), password varchar(80), betreff varchar(80), message text, filename varchar(80), isticket int(1), closed int(1))");
$result = mysql_query2("create table ${prefix}_" . $ticketsystem_id . "data (ids int(50) DEFAULT '1', lastvisit int(10))");
$result = mysql_query3("INSERT INTO `${prefix}_" . $ticketsystem_id . "data` (`ids`, `lastvisit`) VALUES ('1', NULL);");
echo "Die Tabellen wurden erfolgreich angelegt. Löschen Sie nun die install.php.";
}
else
{
echo "Die Tabellen konnte nicht angelegt werden.";
}
include("footer.php");
Tja klappt irgendwie nicht!
Es werden keine Tabellen erstellt!
Findet wer den fehler?
Ich im Moment leider nicht! :cry
Ich würde sie so bzw. so ähnlich schreiben
require_once("config.php");
require "modules/$module_name/_config.inc.php";
include ("header.php");
//Datenbank erstellung
###################
sql_query("create table ${prefix}_" . $ticketsystem_id . "tickets (id int(50), time int(10), name varchar(80), email varchar(80), url varchar(80), password varchar(80), betreff varchar(80), message text, filename varchar(80), isticket int(1), closed int(1))", $dbi);
sql_query("create table ${prefix}_" . $ticketsystem_id . "data (ids int(50) DEFAULT '1', lastvisit int(10)), $dbi);
sql_query("INSERT INTO ${prefix}_" . $ticketsystem_id . "data (ids) VALUES ('1')";
sql_query("INSERT INTO ${prefix}_" . $ticketsystem_id . "data (lastvisit) VALUES ('NULL')";
echo 'Tabellen wurden erstellt';
###################
include ("footer.php");
Kann sein das jetzt ein paar Fehler drinne sind
[Editiert am 19/10/2003 von Future]
:D :D :D
Hab es nun so gemacht:
require_once("config.php");
require "modules/$module_name/_config.inc.php";
if($dbi){
global $prefix;
sql_query("create table ${prefix}_" . $ticketsystem_id . "tickets (id int(50), time int(10), name varchar(80), email varchar(80), url varchar(80), password varchar(80), betreff varchar(80), message text, filename varchar(80), isticket int(1), closed int(1))",$dbi);
sql_query("create table ${prefix}_" . $ticketsystem_id . "data (ids int(50) DEFAULT '1', lastvisit int(10))",$dbi);
sql_query("INSERT INTO `${prefix}_" . $ticketsystem_id . "data` (`ids`, `lastvisit`) VALUES ('1', NULL);",$dbi);
echo "Die Tabellen wurden erfolgreich angelegt. Löschen Sie nun die install.php.";
}
else
{
echo "Die Tabellen konnte nicht angelegt werden.$dbhost,$dbuname,$dbpass";
}
include("footer.php");
und es funzt!!!!!! :D :D
Danke für den Tip! :thumbup:
Null Problemo ;)