Is it possible to....

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Is it possible to....
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
Sorry about the completely unhelpful title.

To have an HTTP IF statement where i a different SQL statement is declared. So i have static-games.l2p.net/reviews=pc This would then query the database and only return results which are PC games, then i have /reviews=xbox then it would only return X-Box ones. Sorry if it's a little vague but i'm interested to see if it's possible.

Thanks
Splinter.




_________________
Back to top Reply with quote
#2   re: Is it possible to....
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
   
I don't see why you would need an IF statement. You would do it all in your query statement, something like "select all from reviews where category=pcgames and subcategory=xbox order by id ascending".



Back to top Reply with quote
#3   re: Is it possible to....
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
i want it on an If statement because that way i wouldn't have to have a seperate "master" page for each different platform. So in the IF statement it could be like...


<?php if (isset($HTTP_GET_VARS["PC""])) { ?>
<?php
mysql_select_db($database_conn, $conn);
$query_rsReviews = "SELECT * FROM tblgames WHERE gamePlatform = 'PC' AND gameLetter = 'A'  ORDER BY gameTitle ASC ";
$rsReviews = mysql_query($query_rsReviews, $conn) or die(mysql_error());
$row_rsReviews = mysql_fetch_assoc($rsReviews);
$totalRows_rsReviews = mysql_num_rows($rsReviews);
<?php } ?>


I'm wondering wether this is possible? Oh and is there anyway in PHP to see the first letter of the game title and use that to only display game reviews of that same letter. So intstead of having a seperate table entry for the beginning letter of the game it would straight away realise what the first letter was and act accordingly. I'm sure you've noticed in my code block it's also got a gameLetter = 'A' which is how i'm doing it right now, but if there was a more effective way of doing it i'd much appreciate knowing how exactly.

Thanks
Andre



_________________
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