From: Michael Dykman Date: May 5 2011 3:06pm Subject: Re: [PHP] mysql error List-Archive: http://lists.mysql.com/mysql/224953 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable >> CREATE TABLE log ( =C2=A0idlog int auto_increment not null, =C2=A0imepri= imek >> varchar(50), =C2=A0clock timestamp, =C2=A0action varchar(30), =C2=A0onfi= le >> varchar(100), filesize float(6,2), uniqueid(idlog) ); -- here is your mistake the syntax for that should be 'unique key(idlog)' if you only wanted to specify a unique key, but this is a mistake. as 'idlog' is marked auto-increment so I assume this is supposed to be the primary which is inherently unique. What you want is: CREATE TABLE log ( idlog int auto_increment primary key, imepriimek varchar(50), =C2=A0clock timestamp, =C2=A0action varchar(30), =C2=A0onfil= e varchar(100), filesize float(6,2)); On Thu, May 5, 2011 at 10:49 AM, Daniel Brown wrote: > On Thu, May 5, 2011 at 10:29, Grega Leskov=C5=A1ek wr= ote: >> Can smbd please look =C2=A0at this sentence - I got an error and do not >> know how to fix it - I am still very unfamiliar with MYSQL: >> >> CREATE TABLE log ( =C2=A0idlog int auto_increment not null, =C2=A0imepri= imek >> varchar(50), =C2=A0clock timestamp, =C2=A0action varchar(30), =C2=A0onfi= le >> varchar(100), filesize float(6,2), uniqueid(idlog) ); >> >> ERROR 1064 (42000): 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 '(idlog) )' at line 1 > > =C2=A0 =C2=A0This is by no means a PHP question, and should not be asked = on the > PHP General mailing list. =C2=A0Please ask questions in the appropriate > place; for this, the MySQL General list is the correct forum, and > they've been CC'd. =C2=A0In the future, if it relates to a PHP database > issue, you may want to use the PHP Database mailing list, also CC'd. > This not only means you'll get more on-target help faster, but also > helps in archiving data in the proper location for future searchers. > > -- > > Network Infrastructure Manager > http://www.php.net/ > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: =C2=A0 =C2=A0http://lists.mysql.com/mysql?unsub=3Dmdykman= @gmail.com > > --=20 =C2=A0- michael dykman =C2=A0- mdykman@stripped =C2=A0May the Source be with you.