| [ Index ] |
PHP Cross Reference of Limb3 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 * Limb PHP Framework 4 * 5 * @link http://limb-project.com 6 * @copyright Copyright © 2004-2007 BIT(http://bit-creative.com) 7 * @license LGPL http://www.gnu.org/copyleft/lesser.html 8 */ 9 10 lmb_require('limb/dbal/src/drivers/lmbDbQueryStatement.interface.php'); 11 lmb_require(dirname(__FILE__) . '/lmbMysqlStatement.class.php'); 12 lmb_require(dirname(__FILE__) . '/lmbMysqlRecord.class.php'); 13 lmb_require(dirname(__FILE__) . '/lmbMysqlRecordSet.class.php'); 14 15 /** 16 * class lmbMysqlQueryStatement. 17 * 18 * @package dbal 19 * @version $Id: lmbMysqlQueryStatement.class.php 5945 2007-06-06 08:31:43Z pachanga $ 20 */ 21 class lmbMysqlQueryStatement extends lmbMysqlStatement implements lmbDbQueryStatement 22 { 23 function getOneRecord() 24 { 25 $record = new lmbMysqlRecord(); 26 $queryId = $this->connection->execute($this->getSQL()); 27 $values = mysql_fetch_assoc($queryId); 28 $record->import($values); 29 mysql_free_result($queryId); 30 if(is_array($values)) 31 return $record; 32 } 33 34 function getOneValue() 35 { 36 $queryId = $this->connection->execute($this->getSQL()); 37 $row = mysql_fetch_row($queryId); 38 mysql_free_result($queryId); 39 if(is_array($row)) 40 return $row[0]; 41 } 42 43 function getOneColumnAsArray() 44 { 45 $column = array(); 46 $queryId = $this->connection->execute($this->getSQL()); 47 while(is_array($row = mysql_fetch_row($queryId))) 48 $column[] = $row[0]; 49 mysql_free_result($queryId); 50 return $column; 51 } 52 53 function getRecordSet() 54 { 55 return new lmbMysqlRecordSet($this->connection, $this->getSQL()); 56 } 57 } 58 59 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Sat Nov 22 03:48:54 2008 | Cross-referenced by PHPXref 0.7 |