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`.`title_third` ,`articles`.`description_el` , `articles`.`description_en` , `articles`.`description_third` , `articles`.`full_text_el` , `articles`.`full_text_en`, `articles`.`full_text_third` , `articles`.`image` , `date` , `articles`.`last_updated` , `articles`.`active`, `pages`.`name_el` as `PageNameEl`, `pages`.`name_en` as `PageNameEn` , `pages`.`name_third` as `PageNameThird` FROM `articles`, `pages` Where `articles`.`PageId` = `pages`.`id` and `articles`.`id`= ;