After i truncate some table in my database I cannot select a specific column in my table which is not affected by the truncate code. I think my database has been corrupted. My final defense is 2 days from now and we already completed the system but after running this code my system went crazy! Because select function functioning properly here is the code that I think literally destroy my database, it is use to reset the evaluation system of a particular university.
mysql_query("TRUNCATE TABLE records");
mysql_query("TRUNCATE TABLE chairassign");
mysql_query("TRUNCATE TABLE studentstotal");
mysql_query("TRUNCATE TABLE tempfiles");
mysql_query("TRUNCATE TABLE tempfiles2");
mysql_query("UPDATE evaluationstatus SET allowviewing ='NO'");
mysql_query("UPDATE faculty SET EvaluateID1 = 'NULL', EvaluateID2 = 'NULL', EvaluateID3 = 'NULL' , EvaluatedbySelf = 'NO' ,canEvaluate = 'NO'");
mysql_query("UPDATE users SET DeanEvaluator = 'NO' ,EvaluatedbySelf = 'NO' ,EvaluatedbyDean = 'NO'");
When I try to select
$faculty = mysql_query("SELECT * FROM faculty WHERE DepartmentID = '$myDepartment'");
it shows up none even though I am pretty sure their is data in the table faculty