View previous topic :: View next topic |
Author |
Message |
oxygen -
Joined: 13 Mar 2005 Posts: 2
|
Posted: Sun Mar 13, 2005 2:24 am Post subject: Error 200- Mysql create table |
|
|
DAMMIT! Ive looked EVERYWHERE on this forum and tried basicly every solution to this error 200 thing.
Anywho, when I try to create a table in mysql it comes up with error 200. I have changed the global thing to 'on' in the php.ini file.
heres the code
<?php
$DBhost = "localhost";
$DBuser = "***";
$DBpass = "******";
$DBName = "***";
$connection = @mysql_connect($DBhost,$DBuser,$DBpass);
echo "$connection";
mysql_select_db("$DBName") or die("Unable to select database $DBName" . mysql_error() );
$sql = "create table users("
"ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, " .
"dateofbirth TINYINTUNSIGNED,".
"quote text,".
"namefirst char(20),".
"namelast char(20),".
"email char(255),".
"username char(255),".
"minitar char(255),".
"password char(255),".
mysql_query($sql)
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
</body>
</html>
I dont think theres any thing wrong with the code. |
|
Back to top |
|
 |
Glitch2082 -
Joined: 02 Dec 2004 Posts: 194
|
Posted: Sun Mar 13, 2005 2:41 am Post subject: |
|
|
You didn't close the $sql string for create table... and you didn't add the delimiter.
Edit: also, your breaking out with the double quotes i believe...
$sql = "create table users('
'ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, ' .
'dateofbirth TINYINTUNSIGNED,'.
'quote text,'.
'namefirst char(20),'.
'namelast char(20),'.
'email char(255),'.
'username char(255),"'.
'minitar char(255),'.
'password char(255),'.)"; _________________ int main() {
cout << "Im Pro Apache";
cin.get();
}
Last edited by Glitch2082 on Sun Mar 13, 2005 2:44 am; edited 2 times in total |
|
Back to top |
|
 |
aprelium-beta -
Joined: 24 Jun 2004 Posts: 383
|
Posted: Sun Mar 13, 2005 2:42 am Post subject: Re: Error 200- Mysql create table |
|
|
Code: |
$sql = "create table users("
"ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, " .
"dateofbirth TINYINTUNSIGNED,".
"quote text,".
"namefirst char(20),".
"namelast char(20),".
"email char(255),".
"username char(255),".
"minitar char(255),".
"password char(255),".
mysql_query($sql)
|
The above code has syntax errors? Isn't PHP reporting errors about it? Do you have enabled PHP error reporting? _________________ Beta Testing Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
oxygen -
Joined: 13 Mar 2005 Posts: 2
|
Posted: Mon Mar 14, 2005 6:07 am Post subject: |
|
|
Errrr. Sorry.
I tried the 'replacement' code Glitch gave me and it still returned the error.
Oh, Its not my server im using, a friends, I better check it out. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|