Announcement

Collapse
No announcement yet.

need help with a FAQ query

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • need help with a FAQ query

    I need help with a query that will pull all FAQs in a selected faqparent.


    For instance,

    SELECT *
    FROM vb_faq
    WHERE faqparent LIKE 'vb_ax_autocross'

    result vb_faq.faqname
    ax_convertibles
    ax_faq2
    ax_faq3


    Then I need to find
    vb_phrase.varname (ax_convertibles)
    vb_phrase.text
    faqtitle (Are convertibles permitted?)
    faqtext (Absolutely! This is one of the...)

    faqtitle (faq2)
    faqtext (faq2)

    faqtitle (faq3)
    faqtext (faq3)

    I'm lost on the join

    Thanks and Happy New Year
    ...steven
    www.318ti.org (vB3.8) | www.nccbmwcca.org (vB4.2)
    bmwcca.org/forum | m135i.net
    "I tried to clean this up but this thread is beyond redemption." - Steve Machol

  • #2
    Something like...

    Code:
    SELECT phrase.varname, phrase.fieldname, phrase.text
    FROM vb_faq as faq
    JOIN vb_phrase as phrase ON ( faq.faqname = phrase.varname ) 
    WHERE faqparent =  'xxxxxx'

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools <- awesome site for html/css help

    Comment


    • #3
      EXACTLY!
      The rest is up to me.

      Lynne, you are too good for this place.
      ...steven
      www.318ti.org (vB3.8) | www.nccbmwcca.org (vB4.2)
      bmwcca.org/forum | m135i.net
      "I tried to clean this up but this thread is beyond redemption." - Steve Machol

      Comment


      • #4
        Lynn,
        Just want to show you what I needed it for.

        http://www.nccbmwcca.org/content.php?252-Autocross-FAQs
        Before it was a separate hardcoded html page.
        Now it pulls from the FAQs making editing much easier
        ...steven
        www.318ti.org (vB3.8) | www.nccbmwcca.org (vB4.2)
        bmwcca.org/forum | m135i.net
        "I tried to clean this up but this thread is beyond redemption." - Steve Machol

        Comment


        • #5
          Very nice!

          (I used to autocross my M3. The reason I got the M3 instead of a 3 series with modifications is because I was talked into it on a BMW forum when I was trying to decide which to buy. )

          Please don't PM or VM me for support - I only help out in the threads.
          vBulletin Manual & vBulletin 4.0 Code Documentation (API)
          Want help modifying your vbulletin forum? Head on over to vbulletin.org
          If I post CSS and you don't know where it goes, throw it into the additional.css template.

          W3Schools <- awesome site for html/css help

          Comment

          Loading...
          Working...
          X