Copy link to clipboard
Copied
Hi,
This is prob a simple thing and i know i have done this before but for the life of me cant remember.
I have on my page 2 recordsets.
one displays from my table "Clients"
the other from my table "Regions"
in my insert into clients table i chose the Region name as to display when inserting but to use the ID for the value to be inserted.
Now when i view my clients recordset set i see "Region = 80" when it should display "London"
how can i display London instead of the value "80" ??
many thanks
Copy link to clipboard
Copied
You only need one recordset. Create an advanced recordset and join the clients table to the regions table.
Copy link to clipboard
Copied
appreciate that so would it be
JOIN clients.region = region.name
??
or along those lines?
cheers
Date: Fri, 30 Apr 2010 12:49:28 -0600
From: forums@adobe.com
To:
Subject: Dreamweaver Application Development Display value from recordset
You only need one recordset. Create an advanced recordset and join the clients table to the regions table.
>
Copy link to clipboard
Copied
Well that's not the correct sql syntax but yes, those are the tables and columns you would join.
Copy link to clipboard
Copied
I guess u are trying to insert data and view data on the same page right? What bregent means u only need one recordset because u only need Region recordset in order to insert data, as u said u store the value in database from the list menu. The client recordset only works when u insert the data if im not mistaken. In order to view word London instead of its value, YES. U have to join both tables. But if u store the word 'London' instead of the value, then u dont need to do join anymore. I mean, on list menu u directly store into database the name of the country(London), not the value(80).
Copy link to clipboard
Copied
I did have it store the word "London" etc however after going onto mysql forum i was advised for better database design to store the value "80" INT in the database.
I tried creating the join however it did not seem to display the result i was looking for??
I tried this:
FROM clients JOIN region ON clients.App1County = region.regionID
no erros just displays the value though instead of the word "London"
any help would be great.
cheers
Date: Tue, 4 May 2010 22:18:09 -0600
From: forums@adobe.com
To:
Subject: Dreamweaver Application Development Display value from recordset
I guess u are trying to insert data and view data on the same page right? What bregent means u only need one recordset because u only need Region recordset in order to insert data, as u said u store the value in database from the list menu. The client recordset only works when u insert the data if im not mistaken. In order to view word London instead of its value, YES. U have to join both tables. But if u store the word 'London' instead of the value, then u dont need to do join anymore. I mean, on list menu u directly store into database the name of the country(London), not the value(80).
>
Copy link to clipboard
Copied
Please show us your database schema, sample data, and the complete select statement you tried.