SQL help in rationalizing query

I’ve written this sql which works, but I feel its not the best it could be. I’m just a novice. SELECT tbl_faults.im_id,tbl_faults_43_repeat.fault_description FROM tbl_faults INNER JOIN tbl_faults_43_repeat ON tbl_faults.id= tbl_faults_43_repeat.parent_id WHERE tbl_faults.fk_inspection_id IN (SELECT id FROM tbl_inspections WHERE dbj_vehicle = 8 AND date = (SELECT MAX(date) FROM `tbl_inspections` WHERE dbj_vehicle = 8))

Media/Template folder fills up with constantly generating css and js files with 8 random characters appended to filenames

One of my site’s media/template folder continues to generate new css and js files every few days. Each file is appended with an 8-character string of random alphanumeric characters. What I expect to see: stylesheet.css What I actually see: stylesheet.ga83laE2.css The site functions fine, but because new files are generated every few days, I end…