Is it possible to build up a body of text in an update field from a bank of comments? For example, the user selects a sentence which goes into the textfield and when the next sentence is selected it goes in at the end of the previous one? The sentences are in a table called CmntBnk and i'd like them to go into a field called 'Cmnt' in table 'Feedback'.
In a past life as an Access developer I did this with a paste command, pasting text from one form directly into another. I also had a procedure to replace an <n> in the comment with the name of the person. Is there any way I can get near to this with PHP?
Thanks
Help with UPDATE
Moderator: General Moderators
-
sunilbhatia79
- Forum Newbie
- Posts: 24
- Joined: Sun Nov 11, 2007 9:37 pm
- Location: Mumbai, India
I am not really sure that I understand this...
Do you want to copy the data from table to another? If yes then you can directly do this using the MySQL itself like this:
I am assuming that you don't have the feedback table created.
Step 1: To copy all records to feedback table
create table feedback select * from cmntbnk;
Step 2: To change the name of the field to cmnt
alter table feedback change assumed_field_name_from_cmntbnk_table cmnt [DATA TYPE AS IN the cmntbnk table]
I hope I have understood your query correctly. In case of anything else, please feel free to ask for more
Sunil
Do you want to copy the data from table to another? If yes then you can directly do this using the MySQL itself like this:
I am assuming that you don't have the feedback table created.
Step 1: To copy all records to feedback table
create table feedback select * from cmntbnk;
Step 2: To change the name of the field to cmnt
alter table feedback change assumed_field_name_from_cmntbnk_table cmnt [DATA TYPE AS IN the cmntbnk table]
I hope I have understood your query correctly. In case of anything else, please feel free to ask for more
Sunil
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
I have a feeling you'll need to use javascript and one of the various "selected text" methods.
check out http://www.codetoad.com/javascript_get_ ... d_text.asp and see if that speaks to you.
check out http://www.codetoad.com/javascript_get_ ... d_text.asp and see if that speaks to you.
Thanks guys. I'll check out the javascript. Rather than copying across a whole table i want users to be able to select the contents of records from that table and then have them pasted in to on field in the feedback table. It's because the feedback will be similar in nature for many respondants and it would save them having to provide text from scratch.
Thanks again!
Thanks again!