Jump to content


Photo

limit results by star rating


  • Please log in to reply
2 replies to this topic

#1 phplee

phplee
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 18 June 2004 - 12:22 PM

does anyone know the code that i would need to limit information from a database (MYSQL) so.. if i was listing hotels and wanted to put them on seperate pages, 5 stars on one page and 4 stars on another and so on, what do i need to do to get this???

is it something to do with

$query = "SELECT * FROM MYTABLE ORDER BY AA_Rating DESC LIMIT";
$result = mysql_query($query) or die("Error: " . mysql_error());

this selects all my info from the database, what needs to be changed or added so i only get 5 star hotels.

regards
phplee

#2 PHP Monkeh

PHP Monkeh
  • Members
  • PipPipPip
  • Advanced Member
  • 409 posts
  • LocationUnited Kingdom

Posted 18 June 2004 - 01:25 PM

What's the fieldname for the star rating?
No monkey business
[br]Remember the manual PHP.net
Legacy Design

#3 phplee

phplee
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 18 June 2004 - 01:58 PM

it is AA_Rating




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users