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 '' at line 1 SELECT `articles`.`id`, `PageId` , `articles`.`title_el` , `articles`.`title_en` ,`articles`.`description_el` , `articles`.`description_en` , `articles`.`full_text_el` , `articles`.`full_text_en`, `articles`.`image` , `date` , `articles`.`last_updated` , `articles`.`active`, `pages`.`name_el` as `PageNameEl`, `pages`.`name_en` as `PageNameEn` FROM `articles`, `pages` Where `articles`.`PageId` = `pages`.`id` and `articles`.`id`= ;