Re: [mccode] FREE Criminal Record (advanced)
What do you call efficent then :|
A script's a script.
The things I would do differently include..... (based of a very quick review)
Not having an Insert for every single crime outcome. Instead, have one row per user. Do not insert unless there is no pre-existing entry. Otherwise, simply increment a counter for success or fail. That will significantly reduce the query needs when you go to report the ratios. I guess you're not even tracking failures but you could easily track both and still end up with more efficient queries
In addition, doing a select * from a table when you do not need every field is wasted processing as well.