|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
Help!
Hi, I wrote my code to creat tables but it doesnt work, can you help me and tell me why, or just write hte basic sintax of creating tables...
Here is my code: <? include_once("db_info.php"); $connect = mysql_connect("$db_host", "$db_user", "$db_pass") or die("Could not connect!"); $connect2 = mysql_select_db("$db_name",$connect) or die("Could not select database!"); mysql_query("CREATE TABLE reviews ( reviewID int(4) NOT NULL auto_increment, reviewmenut varchar(255) NOT NULL, review text , reviewtitle varchar(250) , PRIMARY KEY (reviewID), KEY contenttitle (reviewtitle) ) "); mysql_query("CREATE TABLE previews ( previewID int(4) NOT NULL auto_increment, previewmenut varchar(255) NOT NULL, preview text , previewtitle varchar(250) , PRIMARY KEY (previewID), KEY contenttitle (previewtitle) ) "); mysql_query("CREATE TABLE articles ( articleID int(4) NOT NULL auto_increment, articlemenut varchar(255) NOT NULL, article text , articletitle varchar(250) , PRIMARY KEY (articleID), KEY contenttitle (articletitle) ) "); mysql_query("CREATE TABLE interviews ( iID int(4) NOT NULL auto_increment, imenut varchar(255) NOT NULL, i text , ititle varchar(250) , PRIMARY KEY (iID), KEY contenttitle (ititle) ) "); exit; ?> Also, I tried adding a $query = before all mysql commands but still, i get no result. |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Help! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|