I have two tables I am pulling data from with one query:
SELECT studentid, firstname, lastname, classname FROM students, classes WHERE students.classid = classes.classid ORDER BY lastname ASC
-students- studentid firstname lastname classid
-classes- classid classname
The above query (with help from PHP) prints out a table of students first and last names, replacing the classid with classname.
However, when I delete a record from the 'classes' table, it causes any students with that particular classid to not show up, since nothing matches between the students and classes tables as far as classid.
So what is the best way to display all records in the 'students' table, while still replacing the classid with the classname, and also displaying those that have a deleted/unassociated classid?
You are probably looking for a more step by step answer than this, but this is the best I can offer right now. Read this site, download Rootkit revealer, and check through their forums after you get your results. http://www.sysinternals.