close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

my details page shows a number instead of text?

Thread began 12/08/2009 11:46 am by mr hankey | Last modified 12/08/2009 7:00 pm by mr hankey | 1039 views | 8 replies |

mr hankey

my details page shows a number instead of text?

hi,

i went through and followed the wizard to create my results, insert pages. however the assigned to field allows me to selece from a username at insert yet at results page or details it shows the userid who logged it i.e. 1, 2, 3 ..........etc

can someone tell me how to set this to the username rather than a number?

many thanks

Sign in to reply to this post

Jason ByrnesWebAssist

You need to modify the recordset on the results page to use a JOIN Query to get results from the main table and the user name from the users table.


modify the select .. from statement of the recordset to a joined query, but do not change the where clause.


I do not know your table and column names, so cannot give the exact SQL, but the syntax will be:

SELECT mainTable.*, userTable.*
FROM mainTable
INNER JOIN userTable
ON mainTable.ForeignKeyToUserTable = userTable.PrimaryKey

Then open the bindings tab and esxpand the recordset, the username column from the users table should be listed, replace the userID in the results with the username.

Sign in to reply to this post

mr hankey

thanks, i thought you did not have to do this as it was possible dataassist would create the joins for you?

is it possible to do within the wizard at creation?


many thanks for your help jason

Sign in to reply to this post

Jason ByrnesWebAssist

No, the wizard will not create the joins for you, you have to modify the recordsets after the pages have been created.

Sign in to reply to this post

mr hankey

my understanding from a previous post was no need to create relationships in mysql database as it can be done with dataassist, can you help with a more detailed instruction with this or point me to any docs on this please?

thanks again

Sign in to reply to this post

Jason ByrnesWebAssist

Creating the relationships in the database does not change how the recordsets will be created.

The way you create relationships in the application is through the use or Foreign keys to relate to primary key columns.


when you do this, you need to manually modify the recordsetrs that are created to retrieve the related information using join queries, this will not be done by the DataAssist wizard.


more information on creating join queries can be found here:
sql_join.asp

Sign in to reply to this post

mr hankey

made a bit of a mess with this this is what i came up with from your instruction:

SELECT leads.*, Products.*
FROM Products
INNER JOIN leads
ON Products.ForeignKeyToleads = Products.PrimaryKey

basically in leads there is an enquirytype, in products there is 2 columns prdoid and prdouctname.

i want it to show the product name instead of productid?

many thanks again

Sign in to reply to this post

Jason ByrnesWebAssist

In the on statement, you need to specify the correct column names.

ON leads.ForeignKeyToleads = Products.PrimaryKey



Substitute "ForeignKeyToleads" with the name of the column in the Products table that contains the Product ID, In other words, the column that acts as the Foreign key relationship to the products table.

Substitute "PrimaryKey" With the name of the column in the Products table that contains the product ID. In other words, acts as the primary Key column

Sign in to reply to this post

mr hankey

got you now, thanks alot jason.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...