When I try to execute the following code, I get an error Fuel\Core\Database_Exception [ 1064 ]: You have an error in your SQL syntax;
PHP with MySQL embeded
$sql = "
SET @sql = CONCAT(
'CREATE TEMPORARY TABLE IF NOT EXISTS temp_compiled_properties AS
(SELECT
id,
', @sql, '
FROM properties
WHERE properties.property_id = ?
GROUP BY properties.property_id)');
PREPARE stmt FROM @sql;
EXECUTE stmt USING @property_id;
DEALLOCATE PREPARE stmt;";
DB::query($sql)->execute();
It looks like you're new here. If you want to get involved, click one of these buttons!