Intresting way to search music

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mellowman
Forum Commoner
Posts: 62
Joined: Sat Nov 22, 2008 5:37 pm

Intresting way to search music

Post by mellowman »

hey guys i don't have an issue with my code but more of an issue with the best way to search it...

My database is currently set up to were when someone search's a song they will send a query to the database of the song and it will archive it in the database so that the search will be based on the hit count but there is a problem with this. If you search for the song with that starts with the letter a and has the greatest hitcount it will return you a random song with alot of hits attached to it.

Image

Code: Select all

// other search parameters above this but i wont show them...
 $query = mysql_query("SELECT * FROM searched ORDER BY hitcount");
   while($row = mysql_fetch_array($query))
   {
   $items[$row['searchTerm']] = $row['searchTerm'];
  }
Im going to leave this open to you guys and see what you think.
mellowman
Forum Commoner
Posts: 62
Joined: Sat Nov 22, 2008 5:37 pm

Re: Intresting way to search music

Post by mellowman »

no one? :banghead:
Post Reply