Replaced $table_prefix with $GLOBALS['table_prefix']