variable in mysql query code example
Example 1: how to create a variable in mysql
-- MySQL
SET @variable_name := value;
Example 2: php variable inside mysql query
String : echo "Hello {$var}";
Sql : $query = "SELECT * FROM `table` ORDER BY `$orderby`";