пример кода
Код: Выделить всё
SELECT
`event`.`id` AS eventID,
FROM_UNIXTIME(`event`.`field_242`) AS field_242,
FROM_UNIXTIME(`referee`.`field_377`) AS field_377,
`event`.`field_241` AS eventName,
`referee`.`field_305` AS refereeName
FROM `app_entity_41` AS `link`
LEFT JOIN app_entity_34 AS `referee`
ON (`referee`.id = `link`.field_436)
LEFT JOIN app_entity_28 AS `event`
ON (`event`.id = `link`.parent_item_id)
WHERE `referee`.id = 22
AND `event`.`field_242` >= `referee`.`field_377`
ORDER BY `event`.`field_242` DESC;
Код: Выделить всё
Database Error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT event.id AS eventID, FROM_UNIXTIME(`event`.`field_242`) ' at line 1
Код: Выделить всё
select e.* from app_entity_41 e where
выводить будет ряд значений, интересует именно выполнение данного запроса