2

Here:

http://freshmeat.net/projects/myperl/

I need to enable PHP in MySQL

user198729
  • 61,774
  • 108
  • 250
  • 348
  • 1
    Great question...that project site for myperl doesn't really do a great job of selling the idea. – AJ. Feb 01 '10 at 02:19
  • I need to execute a function introduced in an extension of PHP. – user198729 Feb 01 '10 at 02:28
  • I didn't find the purpose to be completely clear, but check out this SO link. http://stackoverflow.com/questions/41406/how-do-i-execute-php-that-is-stored-in-a-mysql-database – David Feb 01 '10 at 03:09
  • No,I need to do it in MySQL environment,or in a trigger to be exact. – user198729 Feb 01 '10 at 03:55

2 Answers2

2

David Sklar has made a MySQL UDF that interprets PHP code. In the last example, he runs PHP code that was stored in a database table.

See http://www.sklar.com/page/article/myphp

Disclaimer: I haven't actually tried the module.

André Paramés
  • 934
  • 9
  • 23
-3

Most of the binary php distributions (Zend, ActiveState, xamp, wamp etc. etc.) come complete with mysql enabled.

The "pdo" interface (a common interface that supports several DBs much like perl's DBI) is recommend.

James Anderson
  • 27,109
  • 7
  • 50
  • 78
  • 3
    Did you click through the OP's link? I don't think this is what they are asking about. I think it's more along the lines of keeping PHP code inside of MySQL records... – AJ. Feb 01 '10 at 02:17