you are confusing MySQL funcitons and PHP functions.
AES_ENCRYPT() is a MySQL function, not a PHP funciton.
in php you can use mcrypt_encrypt and use the RIJNDAL encryption method which is AES compliant, but PHP does not have a AES_ENCRYPT() funciton
http://us2.php.net/manual/en/function.mcrypt-encrypt.php