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 'order by
is_finish, date_start' at line 13
select
A.*,
if(A.photo is null, "/sites/default/image/noPreviewImage.png", concat("/sites/default/image/activity/", A.photo)) imageUrl,
concat("https://spilnota.uk/activity/", A.id, "/") url,
UNIX_TIMESTAMP(A.date_start) date_start_timestamp,
UNIX_TIMESTAMP(A.date_finish) date_finish_timestamp,
if(A.date_finish, 1, 0) is_finish
from
activity A
where
order by
is_finish, date_start
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 'order by
is_finish, date_start' at line 13
select
A.*,
if(A.photo is null, "/sites/default/image/noPreviewImage.png", concat("/sites/default/image/activity/", A.photo)) imageUrl,
concat("https://spilnota.uk/activity/", A.id, "/") url,
UNIX_TIMESTAMP(A.date_start) date_start_timestamp,
UNIX_TIMESTAMP(A.date_finish) date_finish_timestamp,
if(A.date_finish, 1, 0) is_finish
from
activity A
where
order by
is_finish, date_start
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 'order by
activity_category_id, date_start_timestamp' at line 10
select
A.activity_category_id,
UNIX_TIMESTAMP(A.date_start) date_start_timestamp,
UNIX_TIMESTAMP(if(A.date_finish is null, now(), A.date_finish)) date_finish_timestamp
from
activity A
where
order by
activity_category_id, date_start_timestamp
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 'order by
activity_category_id, date_start_timestamp' at line 10
select
A.activity_category_id,
UNIX_TIMESTAMP(A.date_start) date_start_timestamp,
UNIX_TIMESTAMP(if(A.date_finish is null, now(), A.date_finish)) date_finish_timestamp
from
activity A
where
order by
activity_category_id, date_start_timestamp
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 'group by
activity_category_id
order by
activity_category_id' at line 10
select
A.activity_category_id,
UNIX_TIMESTAMP(Min(A.date_start)) date_start_timestamp,
UNIX_TIMESTAMP(Max(if(A.date_finish is null, now(), A.date_finish))) date_finish_timestamp
from
activity A
where
group by
activity_category_id
order by
activity_category_id
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 'group by
activity_category_id
order by
activity_category_id' at line 10
select
A.activity_category_id,
UNIX_TIMESTAMP(Min(A.date_start)) date_start_timestamp,
UNIX_TIMESTAMP(Max(if(A.date_finish is null, now(), A.date_finish))) date_finish_timestamp
from
activity A
where
group by
activity_category_id
order by
activity_category_id