Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

displaying messages on a details page

New Here ,
Feb 18, 2007 Feb 18, 2007
i have a website for musicians each musician has their own details page that displays all their details i want to create a section that will display messages to the band and the band can answer these comments and they will be displayed on the same page it will be like a guestbook for each musician how do i do this do i just need to link the database tables or what? im not sure if anyone can help please let me know. cheers
TOPICS
Server side applications
271
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 18, 2007 Feb 18, 2007
SELECT * FROM TABLENAME
WHERE MUSICIANNAMEFIELD = 'specificname'

You can also let Dreamweaver automatically do it for you. When you create the recordset choose MUSICIANNAMEFIELD...= ...Entered Value...specificname (no need to put in quotes in the text box when you enter the name). You can then sort it (most recent record first) by setting the order by record number Descending or by a datefield, descending if you like that instead.

Cheers

Chuck
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 19, 2007 Feb 19, 2007
i already have a record set on the page linking to the artists table if i put another record set on the page and use a different table forum1 to display messages how does the forum1 recordset know what messages to display. - ie which artist
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 21, 2007 Feb 21, 2007
LATEST
Since it sounds like you're using a standard relational database, then there should be a field in the first table that ties to the second table. Lets call that field name1 for demo's sake.
In the 2nd Recordset (switch to advanced mode so that you can put it in manually)

SELECT * FROM TABLENAME2
WHERE name1 = DBNAME.TABLENAME1.name1
ORDER BY record_number (or a date field) DESC

Another way to do it is to set it up in two pages. set up the first page using your first recordset and bind it into a form. then pass the name1 value in that form to the second page (GET not POST) and you can set up your second page's recordset to filter (name1 = URL Parameter = name1 (the passed field from the first page) that will pull all info based on the info passed from the first recordset and display it.

Cheers

Chuck
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines