Jump to content
xisto Community

O2xygen

Members
  • Content Count

    1
  • Joined

  • Last visited

Everything posted by O2xygen

  1. I look around the place, and at my own MYSQl scripts, and most look the same except with a few differing factors. Now Im relativly new to MYSQL, and not so new to PHP. The problem is though, I havent been able to test my scripts/site out so Im not sure if my scripts are right. For example, heres a script to create my user table. <?php$DBhost = "localhost"; $DBuser = "********"; $DBpass = "*********"; $DBName = "*********"; $connection = @mysql_connect($DBhost,$DBuser,$DBpass); echo "SQL Connection"; mysql_select_db("$DBName") or die("Unable to select database $DBName" . mysql_error() );?><?php$sql = "create table users(' 'ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, ' . 'dob_day TINYINTUNSIGNED,'. 'dob_month TINYINTUNSIGNED,'. 'dob_year TINYINTUNSIGNED,'. 'quote text,'. 'namefirst char(20),'. 'namelast char(20),'. 'email char(255),'. 'username char(255),'. 'minitar char(255),'. 'password char(255),'.)";mysql_query($sql)$result = mysql_query($sql) or die("Login Query Failed." . mysql_error() . " ". $sql);?><html><head><title>Table created</title></head><body><p>DONE!</p></body></html> and when I compare this to others, some things differ, like the 'ID INT UNSIGNED' bit has underscores instead of spaces and is in lower case. So my question is, does these differing factors matter? Oh, by the way, Im new so Hi everyone
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.