It should work if you have the latest libcod installed.

However, if you use bad mysql queries, it can surely backfire.

Show the rest of your script