Want source code of SQL convert to php

Hi everybody,
I want to put a date and time on my server through PHP coding. I have a SQL code for putting the date and time. That is why I need to source code of sql convert to php language. Is there any way to convert SQL code directly to PHP?
