FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Free Insurance Quotes!
Web Hosting Advertise Here $10 a Month Designer Children
Never Pay Taxes Again HGH Domain name registration
Web Hosting and Dedicated Servers Insurance Affordable web-hosting


HomeWatched TopicsRegisterSearchDirectory
FAQMemberlistUsergroupsLog inStoresItemsBank
Google

Reply to topic Page 1 of 1
accessing and updating multiple records in a database
Message  

Reply with quote
Post accessing and updating multiple records in a database 
I have established a database table that contains many records that are grouped by a  specific code. There may be many records with the same code.

example:

code      ident
BRL-01  120986
BRL-01  118358
BRL-01  127077

I want to join this table with another table using the ident field.

example:

name                 ident
John Doe            120986
Jane Doe            118358
Betty Boop          127077

Then I want to be able to store the joined records with other fields entered by the user.

example:

name                 ident         code          data1      data2      data3
John Doe            120986      BRL-01      3            390         130
Jane Doe            118358      BRL-01      3            375         125
Betty Boop          127077     BRL-01      3            420          140

I can't seem to figure out how to select the data from the two files join them together and then allow the user to input the additional data thru a form which will insert the data into a third table. I'm able to find and insert one record but I can't seem to figure out how to loop thru the data using forms.

Any guidance that would point me in the right direction would be greatly appreciated.

View user's profile Send private message

Reply with quote
Post Re:accessing and updating multiple records in a database 
Hi

Here your solution.

You can get the form posted data before fetch record or after fetch record from table; thats depends on your requirement.

Example:
You fetched the records and showing in multiple row update form page or which way you need.

you have keep the all form posted records in array.

This is query as your need, you can customize as per your need with posted form data.

select table2.name, table2.ident, table1.code, '' as data1, '' as data2, '' as data3 from table2, table1 where table2.ident=table1.ident


_________________
Thanks,
Muthukumar Selvarasu,
Project Manager,
Webmasters Ltd.
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  



Google

FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Free Insurance Quotes!
Web Hosting Advertise Here $10 a Month Designer Children
Never Pay Taxes Again HGH Domain name registration
Web Hosting and Dedicated Servers Insurance Affordable web-hosting


Web Design by PlatinumShore.com & Web Hosting by TradeWebHosting.com