Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
| Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 23rd, 2007, 07:44 AM
Registered User
 
Join Date: Dec 2006
Location: Islamabad, , Pakistan.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default retreive from a table and insert into two tables.

hi

I have two following tables:

[u]Item table:</u>
item_id
item_description


[u]purchase table:</u>
pur_id
pur_date
item_id //from item table

I have a form for user to enter values of a purchased item. I want to populate the values(item_description) from item table to form in a combo box so that user can easily choose the item description.

the user enter all the values and select the value in item_description combo like "black laptop lenovo"

Now I want to put these values in purchase table. All is going ok up to here. But the value of item_description is entered in purchase table is "black laptop lenovo" as chosen by user..........WHILE........i want to add the item_id instead the whole description.

how I will select the item_id relevant to item_description and put it in other table.

thanks

Saifi


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retreive OLE Documents from Table ayazhoda Access VBA 0 August 11th, 2008 06:03 AM
how Insert record into two tables mfarooqw ASP.NET 1.0 and 1.1 Basics 2 July 10th, 2007 05:38 PM
Insert Data into two tables Lofa PHP Databases 4 July 7th, 2007 10:36 PM
Insert into Multiple Tables bmalex1 Beginning PHP 0 February 6th, 2006 12:45 PM
Insert into different Tables cs9896 SQL Language 2 September 16th, 2003 03:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.