MySQL timestamp syntax quick reference

Quick code post with a really useful little function, all it does it return a MySQL timestamp value of ‘now’. It’s useful if you haven’t already committed the format to memory, which sadly I have already… but still, it’s good to have in a common function library.

function mysqlnow() {
    return date("Y-m-d H:i:s");


Leave a Reply