Database Query HELP
Posted: Fri Feb 24, 2017 7:09 pm
My query system was fine before but then I added 3 tables to draw from(Student, Administrator, Instructor) and now every time I try to execute it I get an answer of "revdberr,Database Error: no such table: Administrator" which does't make sense. The solution seems to be staring me in the face but I don't see it. Please help.
on Login
local tPasswordcheck, tPassword
put field "Username" into tUsername
//put "SELECT Password FROM Login WHERE Username = tUsername" into tSQLQuery
if the backgroundColor of graphic "tcolor" is (0,255,0) then
put "SELECT Password FROM Student WHERE Username = '" & tUsername & "'" into tSQLQuery
else
if the backgroundColor of graphic "tcolor" is (0,0,255) then
put "SELECT Password FROM Instructor WHERE Username = '" & tUsername & "'" into tSQLQuery
else
if the backgroundColor of graphic "tcolor" is (255,0,0) then
put "SELECT Password FROM Administrator WHERE Username = '" & tUsername & "'" into tSQLQuery
end if
end if
end if
put revDataFromQuery( tab, return, gConnectionID, tSQLQuery) into field "Password(check)"
on Login
local tPasswordcheck, tPassword
put field "Username" into tUsername
//put "SELECT Password FROM Login WHERE Username = tUsername" into tSQLQuery
if the backgroundColor of graphic "tcolor" is (0,255,0) then
put "SELECT Password FROM Student WHERE Username = '" & tUsername & "'" into tSQLQuery
else
if the backgroundColor of graphic "tcolor" is (0,0,255) then
put "SELECT Password FROM Instructor WHERE Username = '" & tUsername & "'" into tSQLQuery
else
if the backgroundColor of graphic "tcolor" is (255,0,0) then
put "SELECT Password FROM Administrator WHERE Username = '" & tUsername & "'" into tSQLQuery
end if
end if
end if
put revDataFromQuery( tab, return, gConnectionID, tSQLQuery) into field "Password(check)"