473,394 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

lookup fields

Please help. What would the code look like to do the following?
Say you were working with customer and order tables. You are entering a
new order, and key in the customer id in the orders table. Or even choose
from a dropdown. Now say you have several other fields about that customer
that you want filled in from the customer table, ie name, address, phone,
etc... Once that customerid is entered and a tab key is hit, how do you
have the other fields looked up and auto filled in in code?
Please be basic here, I am new to php programming. But the auto fill in is
wat I am trying to learn. By the way, I'm not looking for a short list type
of thing, assume the customer table has several thousand records. Ive
heard of doing thing this with ajax. Ok how? I have no idea how the code
would look. So far I'm only up to a simple flat file database. I'm trying
to learn more now. Please see this for a more detailed description of what
I'm after. http://www.codecomments.com/archive2...-9-623448.html
Apr 1 '06 #1
2 1687
Jim,

This sounds like a great project to learn on. However, it's quite a bit
of instruction for a newsgroup format. I'd start by learning some basic
database interaction and form processing. There are lots of tutorials
available on www.phpfreaks.com that will get you going in the right
direction.

Good luck!

Scott

On Sat, 2006-04-01 at 19:09 +0000, Jim Whitaker wrote:
Please help. What would the code look like to do the following?
Say you were working with customer and order tables. You are entering a
new order, and key in the customer id in the orders table. Or even choose
from a dropdown. Now say you have several other fields about that customer
that you want filled in from the customer table, ie name, address, phone,
etc... Once that customerid is entered and a tab key is hit, how do you
have the other fields looked up and auto filled in in code?
Please be basic here, I am new to php programming. But the auto fill in is
wat I am trying to learn. By the way, I'm not looking for a short list type
of thing, assume the customer table has several thousand records. Ive
heard of doing thing this with ajax. Ok how? I have no idea how the code
would look. So far I'm only up to a simple flat file database. I'm trying
to learn more now. Please see this for a more detailed description of what
I'm after. http://www.codecomments.com/archive2...-9-623448.html


Apr 2 '06 #2
Jim Whitaker wrote:
Please help. What would the code look like to do the following?
Say you were working with customer and order tables. You are entering a
new order, and key in the customer id in the orders table. Or even choose
from a dropdown. Now say you have several other fields about that customer
that you want filled in from the customer table, ie name, address, phone,
etc... Once that customerid is entered and a tab key is hit, how do you
have the other fields looked up and auto filled in in code?
Please be basic here, I am new to php programming. But the auto fill in is
wat I am trying to learn. By the way, I'm not looking for a short list type
of thing, assume the customer table has several thousand records. Ive
heard of doing thing this with ajax. Ok how? I have no idea how the code
would look. So far I'm only up to a simple flat file database. I'm trying
to learn more now. Please see this for a more detailed description of what
I'm after. http://www.codecomments.com/archive2...-9-623448.html


If you want it to fill in blanks when a tab key is hit, you need a client-side
language such as javascript.

PHP is server-side; the user must submit the forum to the server for PHP to get
the form info.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Apr 2 '06 #3

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

Similar topics

3
by: Richard Coutts | last post by:
I want to create a table where the first field is a category, the second field is a subcategory to the first field, and the third field is a subcategory to the second. E.g., the category table...
3
by: my-wings | last post by:
I've been reading about how evil Lookup fields in tables are, but I've got to be missing something really basic. I know this subject has been covered before, because I've just spent an hour or two...
1
by: Zachary Turner | last post by:
I want to make a Lookup Field based on another Lookup field. In other words, I have this table A with two fields: ID and Name, where ID is an Autonumber and Name is a friendly name. Then I have a...
3
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
1
by: Paul H | last post by:
Say I have a table called tblPeopleInfo, one of the fields in the table is called FavouriteFruit. The FavouriteFruit field is a lookup field and will contain Apples, Oranges, Grapes etc..The list...
4
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
11
by: Paul H | last post by:
Suppose I have a table called tblPeople and I want a field to illustrate whether each person prefers cats or dogs. I could do it one of three ways. 1. A plain text field Create a text field in...
2
by: Lance Williams | last post by:
How can you programatically tell if a field in a table is a lookup field? I am looping through the fields collection and I want to see if any fields are lookup fields. Is there a property, or...
7
by: samdev | last post by:
I have set up a table with a few fields that are set to required....all work fine except the fields that are Lookup from another table. What am I forgetting to set? Thanks!!
3
by: Ken Fine | last post by:
This is a question that someone familiar with ASP.NET and ADO.NET DataSets and DataTables should be able to answer fairly easily. The basic question is how I can efficiently match data from one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.