hi. quite new to mysql and ive stumbled accross a frustrating glitch. in creating my mysql table i get an error if i try to assign an int or decimal value to any of my fields. assigning a char value works but thats no good for me as i need to use values of my fields in php equations. the sql code i entered is as follows:
create table price (
frosted white decimal(6,2)not null,
silver mirror decimal(6,2)not null,
tinted mirror (grey, green, bronze) decimal(6,2) not null,
tinted mirror blue decimal(6,2)not null,
tinted mirror pink decimal(6,2)not null,
frosted mirror decimal(6,2) not null,
woodgrain (light, medium, dark) decimal(6,2) not null,
primary key(frosted white) )
And the error:
Error 1064: 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 'white decimal(6,2)not null, silver mirror decimal(6,2)not null, tinted mirror ' at line 2.
if i was to change all of decimal in the above sql commands to char(10) it would work. if i changed them to int(..) id get an error.
the mysql, php, and apache im using came bundled from
www.apachefriends.com (xampp) and i wonder if its anything to do with that. i spent a long time trying to configure each program seperately but gave up after i found out xampp configured everything automatically in a few clicks.
Help would be much appreciated.
Mark