-
Database error: Invalid SQL: select
pcat.id as parinteid,
pcat.nume as parinte,
cat.nume as nume,
cat.id as id,
if((ofrt.id_oferta is null), 0, count(cat.id)) as cnt,
least(coalesce(catpref.id_categorie,0),1) as pref
from
categorii cat
join categorii pcat on
cat.parinte = pcat.id
left join oferte_recente ofrt on
cat.id=ofrt.catID and
cat.id_icon = 0 and
coalesce(ofrt.oras,1)=1
left join categorii_preferate catpref on
cat.id = catpref.id_categorie and
catpref.id_membru=0
group by
parinteid, cat.id, cat.nume
order by
parinteid, id
MySQL Error: 1046 (No database selected)
Database error: next_record called with no query pending.
MySQL Error: 1046 (No database selected)
Database error: Invalid SQL: select max(pret) as pretmax from oferte where datasfarsit >= now()
MySQL Error: 1046 (No database selected)
Database error: next_record called with no query pending.
MySQL Error: 1046 (No database selected)
MySQL Error: 1046 (No database selected)
Database error: next_record called with no query pending.
MySQL Error: 1046 (No database selected)
-
Database error: Invalid SQL: select Furn.id, Furn.nume, count(Ofrt.id_oferta) as cnt
from furnizori Furn
left join (select distinct id_oferta, id, fid, oras, datasfarsit, furnizor from oferte_recente group by id_oferta) as Ofrt
on Furn.id = Ofrt.fid and Ofrt.oras = 1
where Furn.stare = 0
and Ofrt.datasfarsit >= now()
group by Ofrt.fid, Ofrt.furnizor
having count(Ofrt.id) > 0
order by Furn.nume
MySQL Error: 1046 (No database selected)
Database error: next_record called with no query pending.
MySQL Error: 1046 (No database selected)