|
Posted by Anthony Frost on 12/08/05 23:16
In message <43989bf6@news.rivernet.com.au>
"plato" <platoTAKETHISOUT@telpacific.com.au> wrote:
>
> "Hilarion" <hilarion@SPAM.op.SMIECI.pl> wrote in message
> news:dn9dkq$337$1@news.onet.pl...
> > > What am I doing wrong here:
> > >
> > > SELECT *
> > > FROM `photos`
> > > UPDATE photos SET codenumber = CONCAT( LEFT( codename, LENGTH(
> > > codename ) -2 ) , CONCAT( '/', RIGHT( codename, 2 ) ) ) LIMIT 0 ,
> > > 30
> > >
> > > and I get:
> > >
> > > #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
> > > 'UPDATE photos SET codenumber = CONCAT( LEFT( codename , LENG
> >
> > You can't use LIMIT clause in UPDATE statements. It's for limiting
> > data you retrieve from DB with SELECT statements.
>
> For some reason phpmyadmin seems to be adding that onto the end of the
> command, why I have no idea or how to stop it doing so.
Why do you start the query with SELECT when what you are trying to do is
just an UPDATE? phpMyAdmin will always do a LIMIT on a SELECT.
Anthony
Navigation:
[Reply to this message]
|