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 'ORDER BY lgd.title' at line 29
SELECT lg.id,lg.name,lgd.title,lgd.description,lg.parent_id,lg.listorder,lg.fotos_groups_id,lg.active,lg.lat,lg.lon,
IF((select count(*) from llistats l where l.group_id = lg.id and (l.tipus_espai = 'parc' or l.tipus_espai = 'itinerari')) > 0 ,1 ,0) as te_fills,
IF((select count(*) from llistats l where l.group_id = lg.id and l.tipus_espai = 'parc') > 0 ,1 ,0) as te_parc,
IF((select count(*) from llistats l where l.group_id = lg.id and l.tipus_espai = 'itinerari') > 0 ,1 ,0) as te_itinerari,
(select count(*) from admin_users_has_municipis auhm where lg.id = auhm.id_municipi) as num_dinamitzadors,
(select count(*) from llistats l where l.group_id = lg.id and (l.tipus_espai = 'parc' or l.tipus_espai = 'itinerari')) as num_espais,
(select count(*) from llistats l where l.group_id = lg.id) as num_espais_total,
(
select count(*) from products p
left join llistats l_espai on (p.espais_id = l_espai.id)
left join llistats_groups lg_municipi on (l_espai.group_id = lg_municipi.id )
where lg_municipi.id = lg.id
) as num_activitats,
(
select count(*)
from products p
left join products_funcions pf on (pf.id_espectacle = p.id)
left join llistats l_espai on (p.espais_id = l_espai.id)
left join llistats_groups lg_municipi on (l_espai.group_id = lg_municipi.id )
where lg_municipi.id = lg.id
) as num_sessions
FROM llistats_groups lg
LEFT JOIN llistats_groups_description lgd ON (lg.id = lgd.groups_id AND lgd.language_id = '1')
WHERE lg.parent_id = 1121
HAVING
ORDER BY lgd.title
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 'ORDER BY lgd.title' at line 29
SELECT lg.id,lg.name,lgd.title,lgd.description,lg.parent_id,lg.listorder,lg.fotos_groups_id,lg.active,lg.lat,lg.lon,
IF((select count(*) from llistats l where l.group_id = lg.id and (l.tipus_espai = 'parc' or l.tipus_espai = 'itinerari')) > 0 ,1 ,0) as te_fills,
IF((select count(*) from llistats l where l.group_id = lg.id and l.tipus_espai = 'parc') > 0 ,1 ,0) as te_parc,
IF((select count(*) from llistats l where l.group_id = lg.id and l.tipus_espai = 'itinerari') > 0 ,1 ,0) as te_itinerari,
(select count(*) from admin_users_has_municipis auhm where lg.id = auhm.id_municipi) as num_dinamitzadors,
(select count(*) from llistats l where l.group_id = lg.id and (l.tipus_espai = 'parc' or l.tipus_espai = 'itinerari')) as num_espais,
(select count(*) from llistats l where l.group_id = lg.id) as num_espais_total,
(
select count(*) from products p
left join llistats l_espai on (p.espais_id = l_espai.id)
left join llistats_groups lg_municipi on (l_espai.group_id = lg_municipi.id )
where lg_municipi.id = lg.id
) as num_activitats,
(
select count(*)
from products p
left join products_funcions pf on (pf.id_espectacle = p.id)
left join llistats l_espai on (p.espais_id = l_espai.id)
left join llistats_groups lg_municipi on (l_espai.group_id = lg_municipi.id )
where lg_municipi.id = lg.id
) as num_sessions
FROM llistats_groups lg
LEFT JOIN llistats_groups_description lgd ON (lg.id = lgd.groups_id AND lgd.language_id = '1')
WHERE lg.parent_id = 1121
HAVING
ORDER BY lgd.title
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 'ORDER BY lgd.title' at line 29
SELECT lg.id,lg.name,lgd.title,lgd.description,lg.parent_id,lg.listorder,lg.fotos_groups_id,lg.active,lg.lat,lg.lon,
IF((select count(*) from llistats l where l.group_id = lg.id and (l.tipus_espai = 'parc' or l.tipus_espai = 'itinerari')) > 0 ,1 ,0) as te_fills,
IF((select count(*) from llistats l where l.group_id = lg.id and l.tipus_espai = 'parc') > 0 ,1 ,0) as te_parc,
IF((select count(*) from llistats l where l.group_id = lg.id and l.tipus_espai = 'itinerari') > 0 ,1 ,0) as te_itinerari,
(select count(*) from admin_users_has_municipis auhm where lg.id = auhm.id_municipi) as num_dinamitzadors,
(select count(*) from llistats l where l.group_id = lg.id and (l.tipus_espai = 'parc' or l.tipus_espai = 'itinerari')) as num_espais,
(select count(*) from llistats l where l.group_id = lg.id) as num_espais_total,
(
select count(*) from products p
left join llistats l_espai on (p.espais_id = l_espai.id)
left join llistats_groups lg_municipi on (l_espai.group_id = lg_municipi.id )
where lg_municipi.id = lg.id
) as num_activitats,
(
select count(*)
from products p
left join products_funcions pf on (pf.id_espectacle = p.id)
left join llistats l_espai on (p.espais_id = l_espai.id)
left join llistats_groups lg_municipi on (l_espai.group_id = lg_municipi.id )
where lg_municipi.id = lg.id
) as num_sessions
FROM llistats_groups lg
LEFT JOIN llistats_groups_description lgd ON (lg.id = lgd.groups_id AND lgd.language_id = '1')
WHERE lg.parent_id = 1121
AND lg.ACTIVE = 1
HAVING
ORDER BY lgd.title
Palamós
Xarxa d'itineraris saludables
Itinerari curtItinerari llargItinerari mitjà
Parcs urbans de salut
Parc Urbà de Salut de Palamós (Vial Ronda de l'Est)
Parc Urbà de Salut de Palamós (Plaça Enric Vincke)
“Sempre he pensat que la nostra felicitat és una equació perfecte entre exercici físic, relacions socials i natura que donen com a resultat la salut que tots volem. Gràcies al programa de Dipsalut puc transmetre aquesta fòrmula. T'apuntes?”