Reply to Re: prepend data to field

Your name:

Reply:


Posted by Rik on 04/26/07 17:36

Geoff Berrow wrote:
> I have a record in a MySql database which can be edited. Each time it
> is edited I want to give the user the opportunity to summarise the
> changes, which I store in a field. It doesn't really warrant another
> table it would be sufficient to prepend the data to the existing data in
> the field.
>
> Sorry if this is really a MySql problem, but at the moment I can only
> think of a php/html hidden field solution.

Why does it have to be hidden?

Maybe you're looking for something simple like:

HTML:
<textarea name="new_comments"></textarea>

SQL:
UPDATE `tablename` SET `comments` =
CONCAT('{$_POST['new_comments']}','\n',`comments`) WHERE #your clause...

HTH,
--
Rik Wasmus

Estimated date being able to walk again: 01-05-2007.
Less then a week, hurray!

[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

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