From 4fada3c2c84b6f3bf0e9cf55bc94cb0e055097fd Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Mon, 2 Nov 2009 09:58:03 +1300 Subject: [PATCH] Testing the actuality of a usable PDO library. --- htdocs/testpdo.php | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/htdocs/testpdo.php b/htdocs/testpdo.php index 704468ae..f1754fc6 100644 --- a/htdocs/testpdo.php +++ b/htdocs/testpdo.php @@ -1,5 +1,26 @@ LoginRequired(); -require("PdoQuery.php"); +header('Content-type: text/plain; charset="UTF-8"'); +require("AwlQuery.php"); + +echo "Creating query #1...\n"; +$qry = new AwlQuery('SELECT * FROM collection WHERE is_calendar = :calendarness', array( ':calendarness' => true ) ); +echo "Executing query...\n"; +if ( $qry->Exec() ) { + while( $row = $qry->Fetch() ) { + printf( ' --> %-50.50s %s '."\n", $row->dav_name, $row->resourcetypes ); + } +} + +echo "Creating query #2...\n"; +$qry = new AwlQuery('SELECT * FROM collection WHERE is_calendar = false'); +echo "Executing query...\n"; +if ( $qry->Exec() ) { + while( $row = $qry->Fetch() ) { + printf( ' --> %-45.45s %s '."\n", $row->dav_name, $row->resourcetypes ); + } +}