select id, url, name, guideurl, guidelink, dirtitle, dhtmltitle, htmldesciption, metadescription, keywordsdesc, categorydesc, htmldesciption, practicetesturl, toppagelinks, examid, examtext1, examtext2, examimage from categories where url=? and enabled is not null field (s) = Financial-Accounting-US-Test select id, name, url, guideurl, guidelink, guidecontent, guidebox, guidetitle, ghtmltitle, htmldesciption, keywordsdesc, tabletitle, what, who, wherefield, whenfield, how, type, why, time, language, preparation, cost, guidemetadescription, guidekeywordsdesc, guidedescription, practicetesturl, toppagelinks from categories where guideurl=? and enabled is not null field (s) = Financial-Accounting-US-Test select id, template, metatitle, metadescr, metakeywords from pagedata where page=? and active>0 field (s) = Financial-Accounting-US-Test select parent, id, hideads, menuname, title, metatitle, metadescr, metakeywords, body, body2, body3, body4, image1, image2, image3, category, examid, othercontent from pagedata where id=817 select qstnset, free from examset where free is not null select parent, menuname from pagedata where id=333 select id, url, name, guideurl, guidelink, dirtitle, dhtmltitle, htmldesciption, metadescription, keywordsdesc, categorydesc, htmldesciption, practicetesturl, toppagelinks, examid, examtext1, examtext2, examimage from categories where id=485 and enabled is not null select name, value from publiccontent where page='All Pages' or page='All Pages' select id, pagedataid from categories where id = 485 select p.id, p.template from categories c, pagedata p where c.pagedataid=p.id and c.id= 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 count(linkname) as linkcount from categorylinks where catid = 485