#1
|
||
|
Install files
Ok, I'm working on a design site, I'v created install.php for my news script, heres the code:
[code:1:c48666b10c] <? include("config.php"); mysql_query("CREATE TABLE fleabib_news( news_id INT, news_author VARCHAR(30), news_content VARCHAR(1000), news_title VARCHAR(30), )"); ?>[/code:1:c48666b10c] This is very simple, I will know when theres an error, but it doesn't comes up with an error. When its ran, it doesn't instert any field or anything into the database. Here config.php: [code:1:c48666b10c]<?PHP # Database info $host = "localhost"; // keep as this $username = "sc2003-2004"; //username of db $password = ""; //password of the user $db = "sc20032004_uk_db"; //mysql db to connect to # Connect $connect = mysql_connect("$host", "$username", "$password") or die ("Unable to resolve Database username & password"); mysql_select_db($db, $connect) or die ("Unable to connect to the database!"); ?>[/code:1:c48666b10c] Can anyone help me here? - Thnx all |
#2
|
||
|
Tec, check your PM at Nhq.
if you have the tables installed, phpmyadmin will create a instal file for yo via a dump... Varchar can only have up to 255, i think that you would have to change it to text and use php to limit the amount that is posted. Try this for the install file [code:1:fe6438b3dc]CREATE TABLE `fleabib_news` ( `news_id` int(3) NOT NULL auto_increment, `news_author` varchar(30) NOT NULL default '', `news_content` text NOT NULL default '', `news_title` varchar(30) NOT NULL default '', PRIMARY KEY (`news_id`) ) TYPE=MyISAM AUTO_INCREMENT=1 ;[/code:1:fe6438b3dc] |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
install | chadwick | Delta Force | 7 | 08-27-2008 09:12 PM |
Re-install | ib1-2 | Delta Force | 10 | 11-09-2006 03:28 AM |
Install stalls at 99% when I try to install Delta Force – Black Hawk Down | Steve | Delta Force | 0 | 02-22-2004 07:06 AM |
Install stalls at 99% when I try to install Delta Force – Black Hawk Down. | Steve | Delta Force | 0 | 01-08-2004 08:19 PM |
no install | ROCKINDEPENDENT | Delta Force | 3 | 07-01-2003 04:17 PM |