$result = mysql_query(“SELECT * FROM orders,categories WHERE orders.catid = categories.id AND orders.complete = ‘$complete’ ORDER BY $orderby DESC”);
Since I can’t have the dot in $orderby. How can I pass it to the query, so that it orders by orders.name etc?
I am planning to use it in a query string, so should I use: admin.php?orderby=orders_name instead of orders.name? And how can I get the query formated correctly and use orders.name?
Anyway, in this particular case you are creating URL for administration, so it does not matter what is in the URL, if the delimiter is “.” or something else.