The topic of this question is: db_Connect does not connect.
Hello and Thank you in advance for any assistance.
System info:netbeans project,database attached or provided at:
The purpose of this post is: Try to get a sql statement to work
The functionality of this code is:
· "SELECT u.uid, firstName, lastName, address1, address2, city, postCode, email, phone, ug.groupName as userGroup " · +"FROM user u, usergroup ug WHERE uid='"+userName+"' AND password='"+password+"' AND groupName IN" · +" (SELECT groupName FROM usergroup WHERE groupid =(SELECT groupid FROM usergroup_mapping WHERE uid=u.uid))";
My question concerning this code is:
What is wrong with the sql statement provided in tutorial. Or a description of its function .
The errors related to this code are:
Initializing Sun's JavaServer Faces implementation (1.2_04-b22-p05) for context '/school' Initialize <------------>jdbcDriver<------------> 12345678<------------>12345678 SQLException: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 'user u,usergroup ug WHERE uid='12345678' AND password='12345678' AND groupName I' at line 1 Error on DB return java.lang.NullPointerException at servlets.LoginServlet.doPost(LoginServlet.java:82)
I was told to add table qualifiers to the where clause.
What does this mean. Maybe if someone could break down what the statement is saying (laymens terms) I could fix it.