Ok - i'll post it as soon as i have it up - it's for a plastic surgery group - don't think it's a large amount of searches by any means.
Main Topics
Browse All TopicsMy client wants a search where the user selects a parameters from a bunch of different drop downs. i need to list the results based on how many search criteria match up with table content. I think I can handle that part, but what I have no idea how to do is to list the search results in descending order according to how many search criteria are in a specific record.
any good tutorials on this?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
ridiculous or not? seems to work:
<?php
$colname_Cases = "-1";
if (isset($_POST['Patient_Age
$colname_Cases = $_POST['Patient_Age'];
}
$colname2_Cases = "-1";
if (isset($_POST['Patient_Hei
$colname2_Cases = $_POST['Patient_Height'];
}
$colname3_Cases = "-1";
if (isset($_POST['Patient_Kid
$colname3_Cases = $_POST['Patient_Kids'];
}
$colname4_Cases = "-1";
if (isset($_POST['Patient_Wei
$colname4_Cases = $_POST['Patient_Weight'];
}
$colname5_Cases = "-1";
if (isset($_POST['Placement_T
$colname5_Cases = $_POST['Placement_Type'];
}
$colname6_Cases = "-1";
if (isset($_POST['Incision_Ty
$colname6_Cases = $_POST['Incision_Type'];
}
$colname7_Cases = "-1";
if (isset($_POST['Cup_Size_Be
$colname7_Cases = $_POST['Cup_Size_Before'];
}
$colname8_Cases = "-1";
if (isset($_POST['Cup_Size_Af
$colname8_Cases = $_POST['Cup_Size_After'];
}
$colname9_Cases = "-1";
if (isset($_POST['Implant_Typ
$colname9_Cases = $_POST['Implant_Type'];
}
$colname10_Cases = "-1";
if (isset($_POST['Size_ccs'])
$colname10_Cases = $_POST['Size_ccs'];
}
mysql_select_db($database_
$query_Cases = sprintf("SELECT case_id, thumb1, thumb2, thumb3, thumb4, TypeID, DrID FROM breast_enlargement_thumbs WHERE DrID=2 AND TypeID=1 AND Patient_Age LIKE %s OR Patient_Height LIKE %s OR Patient_Kids LIKE %s OR Patient_Weight LIKE %s OR Placement_Type LIKE %s OR Incision_Type LIKE %s OR Cup_Size_Before LIKE %s OR Cup_Size_After LIKE %s OR Implant_Type LIKE %s OR Size_ccs LIKE %s
ORDER BY
(CASE WHEN Patient_Age LIKE \"%$trimm%\" THEN 1 ELSE 0 END +
CASE WHEN Patient_Height LIKE \"%$trimm%\" THEN 1 ELSE 0 END +
CASE WHEN Patient_Kids LIKE \"%$trimm%\" THEN 1 ELSE 0 END +
CASE WHEN Patient_Weight LIKE \"%$trimm%\" THEN 1 ELSE 0 END +
CASE WHEN Placement_Type LIKE \"%$trimm%\" THEN 1 ELSE 0 END +
CASE WHEN Incision_Type LIKE \"%$trimm%\" THEN 1 ELSE 0 END +
CASE WHEN Cup_Size_Before LIKE \"%$trimm%\" THEN 1 ELSE 0 END +
CASE WHEN Cup_Size_After LIKE \"%$trimm%\" THEN 1 ELSE 0 END +
CASE WHEN Implant_Type LIKE \"%$trimm%\" THEN 1 ELSE 0 END +
CASE WHEN Size_ccs LIKE \"%$trimm%\" THEN 1 ELSE 0 END) desc", GetSQLValueString($colname
$Cases = mysql_query($query_Cases, $pacific) or die(mysql_error());
$row_Cases = mysql_fetch_assoc($Cases);
$totalRows_Cases = mysql_num_rows($Cases);
?>
Business Accounts
Answer for Membership
by: Ray_PaseurPosted on 2009-08-14 at 10:27:21ID: 25100344
We would probably need to see the search criteria to be of any help. I am fairly sure you can do this without too much effort. How many searches per second do you expect?