Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005
    Location
    Massachusetts
    Posts
    2

    Unanswered: Retrieving partial data from MySQL database using PHP and Dreamweaver MX

    I have a quick question that may be easy to solve, but has me lost anyway.

    We are a speakers bureau and we have a static website that we are trying to convert into a data-driven site. I've already set up the databases and established connectivity through Dreamweaver. What I'm having a problem with is the search page.

    Once a user does a search for a specific speaker I want the search results to list the speaker name that links to the speakers bio page (which I'm using Dreamweaver templates for) and underneath that link, I want only a portion of that speaker's bio to be listed in paragraph form, so it will look something like this:

    <Speaker Name>
    Speaker bio...blah...blah....<click here to see more>.

    Anybody have an idea of how my select statement should look? I've been searching the web and different tutorials and I can't seem to find anything!

    Thanks for any help.

    --T

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    select SpeakerName
         , SpeakerID
         , left(SpeakerBio,200) as BioExcerpt
      from yourtable
     where search criteria
    then display SpeakerName and BioExcerpt, and use SpeakerID in formatting the href
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Feb 2005
    Location
    Massachusetts
    Posts
    2

    Beautiful...worked like a charm!

    Thanks so much for the tip...who knew it could be that easy!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •