I am working in php along with Mysql in backend, why this query is giving error : You have some problem in mysql syntax, check manual,
this is that query:
$Userid= $_SESSION['userid'];
echo $Userid;
$Dep = "select departmentName from department where userid='$Userid' ";
$qry ="select registrationNo,name,fatherName,cnic,gender,discipline,department,admissionSession,email,password,address,domicile,contactNo,status,currentEmployer,designation,salaryInfo,totalExperience,lastOrganizationname,organizationAdd,organizationPhno,organizationEmail,Remarks from students where registrationNo='$RegNo' AND department= $Dep ";
????