mysql-front error
Moderator: General Moderators
mysql-front error
hey
im using mysl frontend to crete a databse and im trying to insert fields in the tabel but i get the following error.
i tried to insert a field called albumName with type TEXT value 35 and default 0
any help, please!!
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 '(35) DEFAULT '0')' at line 1
thanks
kumar
im using mysl frontend to crete a databse and im trying to insert fields in the tabel but i get the following error.
i tried to insert a field called albumName with type TEXT value 35 and default 0
any help, please!!
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 '(35) DEFAULT '0')' at line 1
thanks
kumar
-
microthick
- Forum Regular
- Posts: 543
- Joined: Wed Sep 24, 2003 2:15 pm
- Location: Vancouver, BC
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
hello.
i´ve got the same problem. i tried removing the length attribute but still it doesn´work
i´m running easyphp1-7 (mysql 4.0.15, php 4.3.3 and apache 1.3.27) under windows XP
thanks for reading, i hope someone can help
and this is what i get
Error
SQL-query :
CREATE TABLE 't_termino'(
'cle_fr'varchar( 250 ) ,
'gram_fr'varchar( 250 ) ,
'src_cle_fr'varchar( 250 ) ,
'var_fr'varchar( 250 ) ,
'syn_fr'varchar( 250 ) ,
'autre_forme_fr'varchar( 250 ) ,
'gram_autre_forme_fr'varchar( 250 ) ,
'nt_fr'text,
'src_nt_fr'varchar( 250 ) ,
'nl_fr'text,
'src_nl_fr'varchar( 250 ) ,
'cle_en'varchar( 250 ) ,
'gram_en'varchar( 10 ) ,
'src_cle_en'varchar( 250 ) ,
'var_en'varchar( 250 ) ,
'syn_en'varchar( 250 ) ,
'autre_forme_en'varchar( 250 ) ,
'gram_autre_forme_en'varchar( 250 ) ,
'nt_en'text,
'src_nt_en'varchar( 250 ) ,
'nl_en'text,
'src_nl_en'varchar( 250 ) ,
'++'varchar( 250 ) ,
'code_op_fr'varchar( 250 ) ,
'code_op_en'varchar( 250 ) ,
'champ'varchar( 250 ) ,
'combinatoire_fr'text,
'combinatoire_en'text,
'valideur_en'varchar( 250 ) ,
'valideur_fr'varchar( 250 ) ,
'domaine'varchar( 250 ) ,
'fiche_douteuse'char( 1 ) NOT NULL default ''
) TYPE = MYISAM
MySQL said:
#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 ''t_termino'( 'cle_fr'varchar( 250 ) ,
'gram_fr'varchar( 250
i´ve got the same problem. i tried removing the length attribute but still it doesn´work
i´m running easyphp1-7 (mysql 4.0.15, php 4.3.3 and apache 1.3.27) under windows XP
thanks for reading, i hope someone can help
and this is what i get
Error
SQL-query :
CREATE TABLE 't_termino'(
'cle_fr'varchar( 250 ) ,
'gram_fr'varchar( 250 ) ,
'src_cle_fr'varchar( 250 ) ,
'var_fr'varchar( 250 ) ,
'syn_fr'varchar( 250 ) ,
'autre_forme_fr'varchar( 250 ) ,
'gram_autre_forme_fr'varchar( 250 ) ,
'nt_fr'text,
'src_nt_fr'varchar( 250 ) ,
'nl_fr'text,
'src_nl_fr'varchar( 250 ) ,
'cle_en'varchar( 250 ) ,
'gram_en'varchar( 10 ) ,
'src_cle_en'varchar( 250 ) ,
'var_en'varchar( 250 ) ,
'syn_en'varchar( 250 ) ,
'autre_forme_en'varchar( 250 ) ,
'gram_autre_forme_en'varchar( 250 ) ,
'nt_en'text,
'src_nt_en'varchar( 250 ) ,
'nl_en'text,
'src_nl_en'varchar( 250 ) ,
'++'varchar( 250 ) ,
'code_op_fr'varchar( 250 ) ,
'code_op_en'varchar( 250 ) ,
'champ'varchar( 250 ) ,
'combinatoire_fr'text,
'combinatoire_en'text,
'valideur_en'varchar( 250 ) ,
'valideur_fr'varchar( 250 ) ,
'domaine'varchar( 250 ) ,
'fiche_douteuse'char( 1 ) NOT NULL default ''
) TYPE = MYISAM
MySQL said:
#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 ''t_termino'( 'cle_fr'varchar( 250 ) ,
'gram_fr'varchar( 250
You have to enclose your field names into backticks (`) and do not forget spaces after field name:
Table name should be enclosed into backticks also:
Code: Select all
//was
'cle_fr'varchar( 250 ) ,
//should be
`cle_fr` varchar( 250 ) ,Code: Select all
//was
CREATE TABLE 't_termino'(
//should be
CREATE TABLE `t_termino`(alright!
thanks you both, weirdan and kumarsena
it works now, using backticks... however i do include a space after fields names, but what i posted is what phpmyadmin returns with the error message
so i actually input:
'cle_fr' varchar(250),
and got (on the error message):
'cle_fr'varchar( 250 ) ,
that is, no space between the field name and the attribute and extra spaces between the length, the brackets and even the comma. weird...
but hey, it works now, thanks a lot!
it works now, using backticks... however i do include a space after fields names, but what i posted is what phpmyadmin returns with the error message
so i actually input:
'cle_fr' varchar(250),
and got (on the error message):
'cle_fr'varchar( 250 ) ,
that is, no space between the field name and the attribute and extra spaces between the length, the brackets and even the comma. weird...
but hey, it works now, thanks a lot!