I'm learning Kohana http://forum.kohanaphp.com/, which has pretty well developed drivers for database access, and I believe the MySQL driver is among the better developed. I chose Kohana because it has a light footprint, and is OOP. But....

But there are issues: they haven't dealt well with the issue of returning error messages (I hope and believe they're working on that for the next version), and they haven't used the pdo framework http://ca.php.net/manual/en/book.pdo.php (again I believe they're incorporating that into the next version).

PDO has a standard error reporting mechanism: http://ca.php.net/manual/en/pdostatement.errorinfo.php

Nothing is easy.

- Henrik

Petko Yotov wrote:
On Saturday 31 January 2009 12:52:44 Peter Bowers wrote:
Apologies for the off-topic post, but you guys here are the most
knowledgeable people I know about PHP development...

I'm just starting to get my feet wet with developing an application on a
PHP/MySQL platform.  I've got it mostly working as a prototype, but it's
not pretty.  I'd like to find some application that will show me elegant
ways of accessing MySQL from PHP...

Do any of you know a good open-source app I could look at to get ideas and
patterns and etc?

For starting a new program, unless it is a very very simple one and will never grow larger, I can recommend the use of a PHP framework that is adapted for MySQL integration. See a list at Wikipedia:

  http://en.wikipedia.org/wiki/Php_framework#PHP

In the past (2006), I have tried CodeIgniter which had some excellent features and excellent documentation. See :

  http://en.wikipedia.org/wiki/CodeIgniter
  http://codeigniter.com/

If not a web framework, at least you should use an abstraction layer for the database access -- instead of the built-in functions mysql_query() and other mysql_*: your own sql_query() which calls mysql_query() -- to be able to later migrate to another database engine.

There is also phpclasses.org where you can find a number of useful snippets (free registration required).

Thanks,
Petko

_______________________________________________
pmwiki-devel mailing list
pmwiki-devel@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel



--

Henrik Bechmann
bechmann.ca

_______________________________________________
pmwiki-devel mailing list
pmwiki-devel@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

Reply via email to