using the wrong mysql function instead of a php function the latest fix did not work

I changed the function to a php function and now it is working properly.