![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Pear Pear programming, this is a very complex subject as with using pear with php can be a difficult task for some, so lets talk pear. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| lukasfeiler Sat May 26 10:54:26 2007 UTC Modified files: /pear/XML_Query2XML/XML Query2XML.php Log: $sql and $options["idColumn"] now also accept the boolean value false; this will save the developer a couple lines in some rare situations http://cvs.php.net/viewvc.cgi/pear/X...&diff_format=u Index: pear/XML_Query2XML/XML/Query2XML.php diff -u pear/XML_Query2XML/XML/Query2XML.php:1.20 pear/XML_Query2XML/XML/Query2XML.php:1.21 --- pear/XML_Query2XML/XML/Query2XML.php:1.20 Sun Apr 15 12:16:58 2007 +++ pear/XML_Query2XML/XML/Query2XML.php Sat May 26 10:54:26 2007 @@ -15,7 +15,7 @@ * @license http://www.gnu.org/copyleft/lesser.html LGPL Version 2.1 * @author Lukas Feiler <lukas.feiler@lukasfeiler.com> * @package XML_Query2XML -* @version $Id: Query2XML.php,v 1.20 2007/04/15 12:16:58 lukasfeiler Exp $ +* @version $Id: Query2XML.php,v 1.21 2007/05/26 10:54:26 lukasfeiler Exp $ */ /**PEAR_Exception is used as the parent for XML_Query2XML_Exception. @@ -61,7 +61,6 @@ * @version Release: @package_version@ * @copyright Empowered Media 2006 * @package XML_Query2XML -* @todo $options['idColumn'] should also accept multiple columns in an array */ class XML_Query2XML { @@ -553,7 +552,11 @@ */ $tree = array(); - $records = $this->_applySqlOptionsToRecord($options, $emptyRecord = array()); + if ($sql === false) { + $records = array(array()); // one empty record + } else { + $records = $this->_applySqlOptionsToRecord($options, $emptyRecord = array()); + } foreach ($records as $key => $record) { $tag = $this->_getNestedXMLRecord($records[$key], $options, $dom, $tree); @@ -770,7 +773,12 @@ $attributes = array(); } - $id = $this->_applyColumnStringToRecord($idColumn, $record, 'idColumn'); + if ($idColumn === false) { + static $uniqueIdCounter = 0; + $id = ++$uniqueIdCounter; + } else { + $id = $this->_applyColumnStringToRecord($idColumn, $record, 'idColumn'); + } if ($id === null) { //the ID column is NULL return false; | |||
| Featured Websites | ||||
|
![]() |
| Tags: cvs, pear, query2xmlphp, xml_query2xmlxml |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [PEAR-DEV] Request for features in PEAR 2.0 (codename Pyrus) | Tony Bibbs | Pear | 5 | 05-27-2007 7:46 PM |
| cvs: pear-core / package-PEAR.xml package2.xml /PEAR/PackageFile/Generator v2.php | Greg Beaver | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pear-core / package-PEAR.xml package2.xml /PEAR Installer.php /PEAR/PackageFile v1.php /PEAR/PackageFile/v2 Validator.php | Greg Beaver | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pear-core / package-PEAR.xml package2.xml /PEAR Downloader.php /PEAR/Downloader Package.php | Greg Beaver | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pear /PHP_CodeSniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting FileCommentSniff.php | Greg Sherwood | Pear | 0 | 05-20-2007 7:41 PM |
| Featured Websites | ||||
|