News Feed
Sections




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

DevShed:
Database Techniques and PHP
June 21, 2007 @ 13:02:00

Continuing on from this previous post, DevShed has this new tutorial posted. Another excerpt from O'Reilly's "Programming PHP, Second Edition" (by Kevin Tatroe, Rasmus Lerdorf, and Peter MacIntyre), this section gets more into connecting to the database, making a query and returning some information.

They start off looking at the DSNs mentioned previously and include a bit of error checking around it to handle anything that might come up. The next step is, of course, to make a query against the information in your database. They also include an example of the fetchRow method to push the returned results into a variable.

The variable is built out as an array, so they show what that array looks like "on the inside" and how you can reference the different values that make it up.

1 comment voice your opinion now!
database technique excerpt oreilly programming database technique excerpt oreilly programming


blog comments powered by Disqus

Similar Posts

PHPBuilder: Pro PHP Security / Preventing SQL Injection, Part 2

Michi Kono's Blog: The Best PHP Book Out There

Evan Coury's Blog: Sharing a database connection across modules in Zend Framework 2

W3Techs.com: Highlights of web technology surveys, Nov. 2010: 3/4 of all websites are based on PHP

Derick Rethans' Blog: Distributions: Please Don't Cripple PHP or Red Hat: Stop Fucking Around


Community Events





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


developer threedevsandamaybe language wordpress community api laravel series list release library unittest interview install introduction application podcast bugfix code configure

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