thrash-boy Posted November 27, 2008 Share Posted November 27, 2008 im very new to the whole mySQL thing (well ive tried it before, but forgot everything lol). [hide=this is what im making (not vital to read)]im trying to create a thing where you enter your codes in flash, it splits them up into the separte bits, gets what each separate bit stands for from the database (through php), and then tells you everything it can about your Holden from the build plate codes. I chose flash because im very familiar with it, and it saves learning something else. I chose to use a database instead of just saving the codes in the flash file because 1. its more challenging and fun to do lol, 2. there are quite a few codes (so i wouldn't want them sitting there in flash taking up memory), and 3. i want to be able to add to/edit the list of codes at any time without making a new swf file.[/hide] anyway to start off im making a table in PHP to store all the engine/trans/diff ratio codes. here is the part of the PHP to make the 1st table: [hide=the bit with the problem]mysql_query( "CREATE TABLE ENG( id INT NOT NULL AUTO_INCREMENT, value VARCHAR(3) NOT NULL, desc VARCHAR(35) NOT NULL, modHQ ENUM('t', 'f', 'u') DEFAULT 'u', modHJ ENUM('t', 'f', 'u') DEFAULT 'u', modHX ENUM('t', 'f', 'u') DEFAULT 'u', modHZ ENUM('t', 'f', 'u') DEFAULT 'u', modWB ENUM('t', 'f', 'u') DEFAULT 'u', PRIMARY KEY(id) )" ) or die (mysql_error()); id = unique ID for that code value = what the code actually is desc = what the code means mod+[HQ-WB] = 5 different values that mean either true, false or unknown. (to say if it was, wasnt or it is unknown if it was available on that model)[/hide] and here is what error it returns when i run the complete php page You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc VARCHAR(35) NOT NULL, modHQ ENUM('t', 'f', 'u') DEFAULT 'u', modHJ ENUM' at line 4 im guessing it something to do with the enum but i cant for the life of me work out what iev done wrong. thanks in advance :D Link to comment Share on other sites More sharing options...
sloter Posted November 27, 2008 Share Posted November 27, 2008 you could take the lazy man's way and jsut install phpmyadmin on your server. Link to comment Share on other sites More sharing options...
dsavi Posted November 27, 2008 Share Posted November 27, 2008 Yeah, use a MySql client or phpMyAdmin to create the table. It's just a one time job. Link to comment Share on other sites More sharing options...
ClareJonsson Posted November 27, 2008 Share Posted November 27, 2008 Agreed PHPMyAdmin is the way to go. [Assist-X] Link to comment Share on other sites More sharing options...
thrash-boy Posted November 27, 2008 Author Share Posted November 27, 2008 ok thanks for the feedback. i was just going to make it with php for a bit of experience but nevermind. luckily the free host im using has phpmyadmin. hopefully i wont have the same trouble with the rest Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now