473,800 Members | 3,089 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

prepend data to field

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.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Apr 26 '07 #1
6 1549
Rik
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_comme nts"></textarea>

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

HTH,
--
Rik Wasmus

Estimated date being able to walk again: 01-05-2007.
Less then a week, hurray!
Apr 26 '07 #2
| --
| Rik Wasmus
|
| Estimated date being able to walk again: 01-05-2007.
| Less then a week, hurray!

less than a week? what happened, rik?
Apr 26 '07 #3
Rik
Steve wrote:
| Estimated date being able to walk again: 01-05-2007.
| Less then a week, hurray!

less than a week? what happened, rik?
I made a brave effort to clean the raingutters on the third floor.
Unfortunately, the ladder did not agree with me, so I took about a 9
meter tumble. Both legs broken, so I'm temporarily in a wheel chair. Sad
thing was I live on the forementioned third floor, and the house did not
have any lifts...

Well, that's about 6 weeks ago, the casts come off come tuesday, and
then we'll check wether the walking is an option. Would be nice, to be
able to work with my normal dualcore AMD souped up machines again,
instead of this ancient laptop. It's got some unfixable harddisk
problems, which mean every time you save a file it's a bit of a gamble
wether it will actually be retrievable later. Oh joy :-)

--
Rik Wasmus

Estimated date being able to walk again: 01-05-2007.
Less then a week, hurray!
Apr 26 '07 #4

"Rik" <lu************ @hotmail.comwro te in message
news:f0******** **@news5.zwoll1 .ov.home.nl...
| Steve wrote:
| | Estimated date being able to walk again: 01-05-2007.
| | Less then a week, hurray!
| >
| less than a week? what happened, rik?
|
| I made a brave effort to clean the raingutters on the third floor.
| Unfortunately, the ladder did not agree with me, so I took about a 9
| meter tumble. Both legs broken, so I'm temporarily in a wheel chair. Sad
| thing was I live on the forementioned third floor, and the house did not
| have any lifts...

good god! so, you heft'd yourself up to the third floor with casts in tow
and stayed up there six weeks?!

| Well, that's about 6 weeks ago, the casts come off come tuesday, and
| then we'll check wether the walking is an option. Would be nice, to be
| able to work with my normal dualcore AMD souped up machines again,
| instead of this ancient laptop. It's got some unfixable harddisk
| problems, which mean every time you save a file it's a bit of a gamble
| wether it will actually be retrievable later. Oh joy :-)

so a wap and shared drive on your home lan wasn't an option? ;^) i know what
you mean though. i'm glad work keeps giving me new ones. the last one i
bought was a 386 32mb ram with a whopping 200mb hd. i took win98 off of it
and put knopix on to see if i could use it for anything...unle ss i
command-lined, xwindows blew just as hard. i actually gave it away to my
neighbor two weeks ago...ne'r a tear was shed.

best wishes on a speedy and full recover.
Apr 26 '07 #5
Message-ID: <f0**********@n ews6.zwoll1.ov. home.nlfrom Rik contained
the following:
>SQL:
UPDATE `tablename` SET `comments` =
CONCAT('{$_POS T['new_comments']}','\n',`commen ts`) WHERE #your clause...
Thanks Rik, that's what I need.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Apr 26 '07 #6
Rik wrote:
Steve wrote:
>| Estimated date being able to walk again: 01-05-2007.
| Less then a week, hurray!

less than a week? what happened, rik?

I made a brave effort to clean the raingutters on the third floor.
Unfortunately, the ladder did not agree with me, so I took about a 9
meter tumble. Both legs broken, so I'm temporarily in a wheel chair. Sad
thing was I live on the forementioned third floor, and the house did not
have any lifts...

Well, that's about 6 weeks ago, the casts come off come tuesday, and
then we'll check wether the walking is an option. Would be nice, to be
able to work with my normal dualcore AMD souped up machines again,
instead of this ancient laptop. It's got some unfixable harddisk
problems, which mean every time you save a file it's a bit of a gamble
wether it will actually be retrievable later. Oh joy :-)
Wow - sorry to hear about you accident, Rik. But it sounds like you're
coming along ok.

I suspect you'll be a little wobbly for a while until you get the
strength back in your lets, but I know you'll be happy to get those
casts off!
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Apr 27 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
26511
by: flamesrock | last post by:
so I know you can append a string. But how do you *prepend* a string, as shown in the following code #dirList = #string = """position""" #for x in len(dirList): # string += '>> %s'%dirList.pop() #(????????????) # to return
37
5095
by: nobody | last post by:
I am writing a framework that other developers will write plug-ins for. I would like for one of the features of the framework to be to intercept all text written to stdout/stderr and prepend timestamps on each line. I would like for this to work for all the printf-line functions (fprintf, etc...) as well as C++ I/O streams (cout and cerr). The key here is that I would like to get these timestamps on the lines of text written to...
5
3400
by: lazypig06 | last post by:
Hi ! I'd like to ask everyone this question. I am currently maintain a website which have hundreds of pages and lot of subdirectories. Most of these pages contains a common function (let's call it "foo()" on top of each of these pages. I've tried to use auto prepend and .htaccess to prepend a file which contains an exact function foo() that is being used on other pages. I kept getting error "Cannot redeclare foo() in..." when I try to...
1
4193
by: y0sh1 | last post by:
I'm new at using macros in excel and need to prepend zeros to a column of data. i know i'll need an if statement with some kind of loop. the logic goes something like, select cell, if number is less than 9 digits long prepend "0" until it is equal to 9 digits. if equal to 9 digits do nothing and select next. can anyone give me some idea as to how the syntax would look like? any help is much appreciated.
0
2003
by: kingpin | last post by:
The reason why I am writing is because I am having trouble with appending information into my XML file and I thought that maybe you could help me out. What I would like is to have the new information inserted at the top of my XML file and not at the bottom. I was reading about prependChild but I am not getting it to work. Can anyone help me out? This a function that I call in my asp code that appends information into an XML file. ...
5
4833
by: lawpoop | last post by:
Hello - Is there an operator where I can prepend a string to a string, without repeating the variable name? I'm aware of the concatenation operator, where you can do $string .= $ending; but I would like to do
0
9689
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9550
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10495
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5597
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4148
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2942
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.