Reply to Re: mysql wildcards

Your name:

Reply:


Posted by J.O. Aho on 10/10/86 11:39

mr gumpy wrote:
> I want to update a number of timestamps that look like this 1027094500
> to look like this 20051027094500
> This is the sort of thing I have been trying with no success:
>
> UPDATE `newCalls` WHERE timeStamp LIKE '10%' SET timeStamp LIKE '200310%'
>
> I would be grateful if anyone could tell me what I should be doing.

You need to use CONCAT and it's for strings, not for integers.


UPDATE newCalls SET timeStamp=CONCAT('2003',timeStamp) WHERE timeStamp LIKE '10%';

If your timestamp is in unix time, adding a year infront is to ruin the whole
thing with timestamps.



//Aho

[Back to original 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

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