|
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!
Navigation:
[Reply to this message]
|