You are here: Re: adding a / to code numbers... « PHP SQL « IT news, forums, messages
Re: adding a / to code numbers...

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация