View unanswered posts | View active topics It is currently Sat Aug 13, 2022 7:19 pm



Reply to topic  [ 2 posts ] 
 limit results by star rating 
Author Message
Junior Member

Joined: Wed May 19, 2004 9:11 am
Posts: 10
Post 
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


Fri Jun 18, 2004 6:18 am
Report this post
Profile
Junior Member

Joined: Wed May 19, 2004 9:11 am
Posts: 10
Post 
hi Xnuiem,

i tried what you said but i just get an error,

SELECT * FROM MYTABLE where $AA_Rating = 5

Could you please explain in a bit more detail please so that i would be able study it and get it working

regards
phplee

p.s.

The full code would be a great help, as i do not know much about thisn part of php.
agian my regards
phplee


Mon Jun 21, 2004 2:47 am
Report this post
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.