I have set it out like this and it works great.
$Query = "SELECT * from Trainz_files WHERE Name LIKE '%$search%' ORDER BY $Sort $Order";
But i have one more problem, i need it to also need the "Type" to be = to layout like this
"Type='Layout'"
how could i add this into that.
Thanks