Displaying more than one SQL Query in the same place

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Displaying more than one SQL Query in the same place
SpLiNteR
CZ Addict
SpLiNteR has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Student
Age: 34
Gender: Male
Fav. Sports Team: Leeds United
Website:
Status: Offline
Joined: Feb 08, 2004
0.05 posts per day
Posts: 397
Points: 206,328
AIM Address Yahoo Messenger MSN Messenger ICQ Number
Hey, i'm busy there working away on my site, so i've got a search function on my site and it's working, yes i know it's amazing it worked! So, what i want is the title of the search result to also link to the page which has got that content on like normal search engines do. I just can't figure out how to do it, i tried seperating with a comma eg.

<?php echo $row_rsSearch['gameTitle', 'gameLink']; ?>


But that gives errors. I know it's possible but i don't have much of an understanding of PHP and MySQL so i don't know how to do that. Oh and what should the link on the database be, as in, where should i be relative from, or should it just be [ Register or login to view links on this board. ] ? If it's relative, should it be relative from the public html folder?

EDIT:: I've thought about this some more and spoken with someone about it, apparantly it would be better to have reviews with dynamically generated URLs rather than a static one. Although, this would mean all content needs to be access via the database.



_________________
Back to top Reply with quote
#2   re: Displaying more than one SQL Query in the same place
Kelly_Hero
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif southcarolina.gif
Occupation: Web Developer
Age: 59
Gender: Female
Website:
Status: Offline
Joined: Aug 20, 2003
0.48 posts per day
Posts: 3765
Points: 351,412
   
This is how the link would look.
<?php echo "<a href='www.mysite.com/results.html?page=$pageurl'>" . $row_rsSearch['gameTitle'] . "</a>"; ?>


$pageurl would be called from a table in your database that holds the page urls. The ?page=$pageurl part after the address passes the information through the url. You would retrieve that information in the next page using $_GET[$pageurl];


Back to top Reply with quote
#3   re: Displaying more than one SQL Query in the same place
SpLiNteR
CZ Addict
SpLiNteR has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Student
Age: 34
Gender: Male
Fav. Sports Team: Leeds United
Website:
Status: Offline
Joined: Feb 08, 2004
0.05 posts per day
Posts: 397
Points: 206,328
AIM Address Yahoo Messenger MSN Messenger ICQ Number
Thanks kelly it work great icon_biggrin.gif




_________________
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum