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 'and w. m_name_id = md.name_id GROUP BY w.m_name_id ORDER BY RAND() LIMIT 4' at line 1
select w.thumb_path, w.m_name_id from wallpaper_details_movies as w, movies_details as md where md.cat_id='' and w. m_name_id != and w. m_name_id = md.name_id GROUP BY w.m_name_id ORDER BY RAND() LIMIT 4