Josh
Josh

Reputation: 12566

Execute script in stored procedure

Can you execute, say a PHP script from a stored procedure in a MySQL database? Or are you limited purely to internal / custom database functions?

Upvotes: 0

Views: 239

Answers (2)

ajreal
ajreal

Reputation: 47321

First question : No

Second question : Depends

mysql> \! php -r "echo 1;";
1    "> /* <-- results from php */

However, I don't think is advisable to this ...

Upvotes: 2

Babiker
Babiker

Reputation: 18798

I dont believe you can do that, but as you know you can execute a stored procedure from PHP. But even if its possible, I wouldn't do it. For some reason it seems like you're trying to solve your problem the wrong way.

Upvotes: 1

Related Questions