0

I am trying to do something like this:

$valueset1="'1','2','3'";
$valueset2="'a','b','c'";
$sql="SELECT * FROM tablename ORDER BY cul1 IN ($valueset1), cul2 IN ($valueset2)";

so that if the table was something like this:

id cul1 cul2
1   4    a
2   1    d
3   2    b
4   5    e

The order at which the sql selects is row number 3, 2, 1, 4.

Is this possible? Sorry if the question was confusing.

dshukertjr
  • 15,244
  • 11
  • 57
  • 94

0 Answers0