Skip to content
View in the app

A better way to browse. Learn more.

Tip.It Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

new to mySQL and need help

Featured Replies

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

you could take the lazy man's way and jsut install phpmyadmin on your server.

  • Author

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

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.