| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: mysql.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla.Legacy 5 * @subpackage 1.5 6 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. 7 * @license GNU/GPL, see LICENSE.php 8 * Joomla! is free software. This version may have been modified pursuant 9 * to the GNU General Public License, and as distributed it includes or 10 * is derivative of works licensed under the GNU General Public License or 11 * other free or open source software licenses. 12 * See COPYRIGHT.php for copyright notices and details. 13 */ 14 15 // Check to ensure this file is within the rest of the framework 16 defined('JPATH_BASE') or die(); 17 18 // Register legacy classes for autoloading 19 JLoader::register('JDatabaseMySQL', JPATH_LIBRARIES.DS.'joomla'.DS.'database'.DS.'database'.DS.'mysql.php'); 20 21 /** 22 * Legacy class, use {@link JDatabase} instead 23 * 24 * @deprecated As of version 1.5 25 * @package Joomla.Legacy 26 * @subpackage 1.5 27 */ 28 class database extends JDatabaseMySQL 29 { 30 function __construct ($host='localhost', $user, $password, $database='', $prefix='', $offline = true) 31 { 32 $options = array ( 'host' => $host, 'user' => $user, 'password' => $password, 'database' => $database, 'prefix' => $prefix ); 33 parent::__construct( $options ); 34 } 35 36 /** 37 * This global function loads the first row of a query into an object 38 * 39 * If an object is passed to this function, the returned row is bound to the existing elements of <var>object</var>. 40 * If <var>object</var> has a value of null, then all of the returned query fields returned in the object. 41 * 42 * @param object The address of variable 43 */ 44 function loadObject( &$object ) 45 { 46 if ($object != null) 47 { 48 if (!($cur = $this->query())) { 49 return false; 50 } 51 52 if ($array = mysql_fetch_assoc( $cur )) 53 { 54 mysql_free_result( $cur ); 55 mosBindArrayToObject( $array, $object, null, null, false ); 56 return true; 57 } else { 58 return false; 59 } 60 61 } 62 else 63 { 64 $object = parent::loadObject(); 65 return $object; 66 } 67 } 68 69 /** 70 * Execute a batch query 71 * 72 * @abstract 73 * @access public 74 * @return mixed A database resource if successful, FALSE if not. 75 */ 76 function query_batch( $abort_on_error=true, $p_transaction_safe = false) 77 { 78 return parent::queryBatch( $abort_on_error, $p_transaction_safe); 79 } 80 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |