News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Ulf Wendel's Blog:
Using MySQL stored procedures with PHP mysqli
November 04, 2011 @ 11:39:18

Ulf Wendel has a new post today with details on using stored procedures with mysqli - not overly difficult if you know how to handle the IN, OUT and INOUT parameters. He includes a few code examples showing how to use them.

Out of curiosity I asked another friend, a team lead, how things where going with their PHP MySQL project, for which they had planned to have most of their business logic in stored procedures. I got an email in reply stating something along the lines: "Our developers found that mysqli does not support stored procedures correctly. We use PDO.". Well, the existing documentation from PHP 5.0 times is not stellar, I confess. But still, that's a bit too much... it ain't that difficult. And, it works.

He describes the three parameters (IN, OUT and INOUT) and gives some examples of setting/getting them from your SQL statements. They're all still set up using the query method on your connection as well as handling the result sets that come back and working with prepared statements.

0 comments voice your opinion now!
mysql stored procedures mysqli database in out inout parameter


blog comments powered by Disqus

Similar Posts

Brian Swan's Blog: SQL Server Driver for PHP Connection Options: Connection Pooling

Federico Cargnelutti's Blog: Database Replication Adapter for Zend Framework Applications

Chris Hartjes' Blog: The Devilís In The Details (or, Handling Sequences in Postgres in CakePHP)

PHPBuilder.com: Build a PHP Link Scraper with cURL

Devshed: Database Details and PHP


Community Events

Don't see your event here?
Let us know!


library api language wordpress unittest development release series threedevsandamaybe voicesoftheelephpant laravel5 opinion podcast introduction framework extension feature interview laravel community

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework