Table prefix support added to C code

I have only modified the C code, please let me know if the PHP API also needs to be changed.