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 RAND() LIMIT 3' at line 1

SELECT id_pro AS id_blog,pro_name AS title,`date`,url,thumb,content, 'projects' AS `blog_name` FROM project WHERE id_catpro= ORDER BY RAND() LIMIT 3