This is a discussion on "MySQL UPDATE after use $uniqueID to find table row, etc" within the PHP Forum section. This forum, and the thread "MySQL UPDATE after use $uniqueID to find table row, etc are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
MySQL UPDATE after use $uniqueID to find table row, etc
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
MySQL UPDATE after use $uniqueID to find table row, etc
i have a table with 7 writable fields. i've already populated column1 w/ data. so, 6 fields in each row need updating.
the data in field #1 is a "unique identifier" code, but not the auto_increment field, and therefore should NOT be updated along with its row's neighboring cells. this "unique Identifier" column is used as a human-friendly reference-point for sifting through records in the table via HTML select dropdown box, and its value should remain static once entered into the db. currently, the HTML from is set up as a dropdown list containing all $uniqueID options, and then 6 remaining <input type="text"> fields. i want to select one of those ID's and enter data in its 6 remaining fields-- preferrably all from one page. but, what if some, or all of those 6 remaining field properties of this ID are already populated? i need to be able to check the data in those cells which neighbor the unique ID option selected from the dropdown of so that i can recognize which fields of that row do not yet contain info, or if any existing info needs to be updated-- which might look something like this (off the top-of-my head):
my obstacle is finding a way to populate those <input> fields. If there is already data in the uniqueID row's 6 other fields, i want that data to "populate" those text input fields so if modifications need to be done to the existing data, the data is already in the <input type="text"> fields-- making it very convenient for the user to manipulate-- so one needs only to put the cursor in the field and update the info. if the fields in uniqueID's row are empty, then it would be as if it were any other form field w/ blank text input areas. i hope this makes sense to you. i had difficulty in articulating what i'm trying to do here. sorry it took so many words to "talk it out"! EDIT: if javascript is the answer, please give me a tip, or point me in the direction of a tutorial if you can-- i'm rather inexperienced in javascript. thanks! thanks!! Last edited by jswebdev; Dec 6th, 2005 at 06:27. |
|
|
|
||||
|
Re: MySQL UPDATE after use $uniqueID to find table row, etc
What you are trying to do is a very standard thing.
All you need to do is to select an ID (row) from a dropdown.... the page should then (via javascript) throw the ID over to the script which will get the record and you can then populate the data into the form. To use Pseudo code:-
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
![]() |
| Tags |
| mysql, update, use, uniqueid, table, row, etc |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Count something in MySQL Table? | Jack Franklin | PHP Forum | 5 | Jan 11th, 2008 17:46 |
| Viewing the contents of a table in MySQL | nemmea | Databases | 3 | Sep 6th, 2007 22:01 |
| Find(on this Page) Feature for HTML table | sameer2k | JavaScript Forum | 1 | Jul 8th, 2006 12:51 |
| mysql update record | djme | Databases | 4 | Nov 28th, 2005 11:12 |
| Update Table | ekendricks | Classic ASP | 1 | Sep 8th, 2003 08:28 |