[EMAIL PROTECTED] wrote:
Thanks Salam, but a question: this would mean that I must do by hand every record ID link, no?
I don't think you are building your master html page by hand, do you?
No, of course no hand work.
The script should take care of it e.g. in a loop while fetching the records from the 1st query to be presented (each record will have it's own peopleID) you have to add something like this to the url which will be then read by the update script.
yourUpdateScript?id=$peopleID
Salam
On Sunday, June 29, 2003, at 02:29 AM, Salam Baker Shanawa wrote:
Hi Ted,
1. Modify the query which presents all records by selecting let's say the peopleID.
2. When you build your update link you can use that ID to ask for a particular record.
3. Then you can use the same query + " AND peopleID=THE_ID_OF_THAT_RECORD_EXTRACTED_FROM_THE_LINK".
something like this:
ALL RECORDS:
SELECT peopleID, firstName, lastName, deptPOS, workPH, homePH, location, model,
make, propID, addressIP, OS FROM people, make, models, machines
WHERE people.peopleID = machines.peopleID AND make.makeID =
models.makeID AND models.modelID = machines.modelID;
PARTICULAR RECORD:
SELECT peopleID, firstName, lastName, deptPOS, workPH, homePH, location, model,
make, propID, addressIP, OS FROM people, make, models, machines
WHERE people.peopleID = machines.peopleID AND make.makeID =
models.makeID AND models.modelID = machines.modelID AND peopleID=THE_ID_OF_THAT_RECORD_EXTRACTED_FROM_THE_LINK;
regards Salam
[EMAIL PROTECTED] wrote:
I'm writing here in hopes of finding someone who uses this and might be able to help me.
I am dealing with a recordset who's query is thus:
SELECT firstName, lastName, deptPOS, workPH, homePH, location, model, make, propID, addressIP, OS FROM people, make, models, machines
WHERE people.peopleID = machines.peopleID AND make.makeID = models.makeID AND models.modelID = machines.modelID;
My tables and keys are:
table 1) people - primary key = peopleID
table 2) make - primary key = makeID
table 3) models - primary key = modelID - foreign key = make ID
table 4) machines - primary key = machinesID - foreign keys = peopleID, modelID
The above query (using Dreamweaver MX speak) is a "repeating region" behavior so that I get a "master" PHP page in web browser that displays all my records with the fields as I wish them (using the data from the 4 tables), that works fine --thanks all.
At the end of each row (record) on that "master" page I am building 2 links: Update and Delete. The Update link will lead to a "detail page" of that particular record, identical visually to the particular record in the master page except that it will be presented in an editable/submit form -that will update the record in the database. Right now my problem is how to adjust the recordset query -above- to produce the result that will give that specific record/row that the link is next to. Right now I have the link working but I am using the same query as above and I am not getting the row that is "next to" the link, i.e., I'm not getting the correct record -but some other record.
If anyone on this list has any knowledge and could help get over this hurdle I would be EXTREMELY grateful -been trying to figure this out for days.
I apologize in advance for posting this here if that was wrong. I won't do again, I'm just looking for some help. I have several books and have been to other forums and the internet... still working on >> it.
Thanks,
Ted
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]