Current location: Hot Scripts Forums » Programming Languages » PHP » how to weigh mysql select results


how to weigh mysql select results

Reply
  #1 (permalink)  
Old 02-27-05, 07:30 PM
bugalyzer bugalyzer is offline
Newbie Coder
 
Join Date: Apr 2004
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
how to weigh mysql select results

what is the best way to weigh results in a select query?

example:

table test (a varchar(100))
--------------------------
(record) value
(1) this is a test line
(2) this is another test line containing the word line twice

If i want to perform a 'select from test where a like "%line%" and have the order appear with the records containing 'line' the most first - what is the best way? Are there mysql commands - or should I create a PHP array and manipulate it's contents?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 02-28-05, 01:38 PM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 03:22 AM
SELECT all Entries beginnign with a number from mysql Klesti PHP 3 10-10-04 10:46 AM
Mysql Select IB FORUM PROBLEM landboy PHP 4 07-28-04 12:07 PM
Paginating mysql results. simone PHP 6 12-26-03 03:25 PM
Which way to display results from mysql Peter_web PHP 2 09-13-03 06:39 PM


All times are GMT -5. The time now is 07:08 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.