If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Retrieving partial data from MySQL database using PHP and Dreamweaver MX

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-01-05, 17:24
snazzynerd snazzynerd is offline
Registered User
 
Join Date: Feb 2005
Location: Massachusetts
Posts: 2
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
Reply With Quote
  #2 (permalink)  
Old 02-01-05, 20:17
r937 r937 is online now
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
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
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 02-02-05, 09:30
snazzynerd snazzynerd is offline
Registered User
 
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!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On