Replace deprecated mysql() function