SELECT SQL_CALC_FOUND_ROWS DISTINCT a.avatar,
a.firstname,
a.lastname,
a.agent_id,
cat.name AS cat_name,
n.*
FROM agent AS a
INNER JOIN blog_note AS n
ON a.agent_id = n.agent_id
LEFT JOIN blog_category AS cat
ON n.category = cat.cat_id
WHERE 1 AND n.agent_id =
ORDER BY creation_day DESC
LIMIT 0,12
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 creation_day DESC
LIMIT 0,' at line 13 SELECT *
FROM agent
WHERE 1 AND agent_id = LIMIT 1
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 'LIMIT 1' at line 3