[Openfirst-cvscommit] SF.net SVN: openfirst: [192] trunk/src/includes/dbase.php
Brought to you by:
xtimg
|
From: <ast...@us...> - 2006-06-23 04:50:45
|
Revision: 192 Author: astronouth7303 Date: 2006-06-22 21:50:42 -0700 (Thu, 22 Jun 2006) ViewCVS: http://svn.sourceforge.net/openfirst/?rev=192&view=rev Log Message: ----------- Added the 'dir' option to select() Modified Paths: -------------- trunk/src/includes/dbase.php Modified: trunk/src/includes/dbase.php =================================================================== --- trunk/src/includes/dbase.php 2006-06-23 04:49:53 UTC (rev 191) +++ trunk/src/includes/dbase.php 2006-06-23 04:50:42 UTC (rev 192) @@ -275,10 +275,13 @@ $tailOpts .= " ORDER BY {$options['ORDER BY']}"; } else if ( isset( $options['order'] ) ) { $tailOpts .= " ORDER BY ".$this->quoteField($options['order']); + if (isset( $options['dir'] )) { + $tailOpts .= ' '.$options['dir']; + } } if ( isset( $options['LIMIT'] ) ) { $tailOpts .= " LIMIT {$options['LIMIT']}"; - } + } if ( is_numeric( array_search( 'FOR UPDATE', $options ) ) ) { $tailOpts .= ' FOR UPDATE'; @@ -298,7 +301,7 @@ /** SELECT wrapper. * Copied from MediaWiki. - * $options is feed to DataBase::makeSelectOptions() + * $options is fed to DataBase::makeSelectOptions() */ function select( $table, $vars, $conds='', $options = array() ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |