passing mysql query to php variable site:stackoverflow.com code example
Example: php variable inside mysql query
String : echo "Hello {$var}";
Sql : $query = "SELECT * FROM `table` ORDER BY `$orderby`";
String : echo "Hello {$var}";
Sql : $query = "SELECT * FROM `table` ORDER BY `$orderby`";