Hi, checked the attached php file. Got little confused. I could see entries like "SELECT * FROM `". $table ."`" Is this being added by you? I am not good with php but good with SQL. You could just have the script SELECT * FROM TABLE where group_id="1"; in your case since SELECT * FROM TABLE where group_id="1"; If the php file is not modified, you may provide it and surely i will have a look at it. Thank you.