switched to mysqli
fixed an escaping problem