 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Rashaud Teague's Blog: Basic Data Trees
by Chris Cornutt August 21, 2009 @ 11:41:08
Rashaud Teague has posted a new tutorial to his blog about data trees and parent/child relationships in PHP applications:
Displaying data in data trees showing parent/child relationships can be important to your application for when users are looking for data. [...] Here I will be showing you (most likely a beginner programmer) how to display data from a database (MySQL) using PHP. In the this example I'm using the data from Maris SimpleDocu, a "simple" documentation system.
His simple table holds data for a series of pages linked by a "parent" key column. Back in the PHP he uses a recursive function to pull in a subset of the data. The end result is output showing the levels of the data, spaced out by dashes.
voice your opinion now!
data tree simpledocu tutorial
Robert Basic's Blog: Playing with Zend_Navigation and routes
by Chris Cornutt August 10, 2009 @ 08:13:12
In this new post to his blog Robert Basic looks at the Zend_Navigation component of the Zend Framework and how it can be used to more correctly handle bad requests.
I wanted to set up routes in such way that when a user requests a page, all requests for non-existing controllers/modules are directed to a specific controller (not the error controller). In other words, if we have controllers IndexController, FooController and PageController, anything but http://example.com/index and http://example.com/foo is directed to the PageController.
Using the Zend_Controller_Router_Route_Regex component he creates an expression that matches anything but the two allowed controllers and pushes them back over to the "page" controller. The new route is put in place via an addRoute call. He also shows how to use the Zend_Navigation component to manage the navigation structure for this application, defining a PHP array of the nested sitemap if the site.
voice your opinion now!
zendnavigation route regex tree
Internet Super Hero: PHP mysqlnd and its tests
by Chris Cornutt July 30, 2007 @ 15:55:00
The Internet Super Hero blog has posted some new tests using the mysqlnd driver for PHP and shows you how it's all done for you to follow along at home.
PHP extensions can test their userland (PHP) functionality using so called "phpt Tests". phpt Tests consist of several parts with their main part being regular PHP code to test PHP. On the website of the PHP Quality Assurance Team you can find a documentation of the phpt Tests syntax on the page Writing Tests, if your are interested in the details. Most extensions contain a tests/ subdirectory in the PHP source code to ship the tests together with C code of the extensions. So do ext/mysql and ext/mysqli.
They show the testing structure they used and some of the stats they found from their runs. The rest of the post is dedicated to how it was all set up:
- implemented as phpt Tests
- which need new settings
- Using run-tests.php to run the tests
- Failing tests
- Useful run-tests.php options and features
They also briefly mention what a typical set of test results are (for the time the post was made).
voice your opinion now!
mysqlnd test tutorial php6 tree phpt mysqlnd test tutorial php6 tree phpt
|
Community Events
Don't see your event here? Let us know!
|