Ver Mensaje Individual
  #9 (permalink)  
Antiguo 15/07/2009, 14:58
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Dudas sobre zend

Pues esque define "usar" Zend, si bien esto es un código perfectamente válido y usa Zend:
Código php:
Ver original
  1. <?php
  2. set_include_path('.;/web/library;/web/site');
  3. $autoloader = Zend_Loader_Autoloader::getInstance();
  4.  
  5. $db = Zend_Db::factory('Pdo_Mysql', array(
  6.     'host'     => 'localhost',
  7.     'username' => 'user',
  8.     'password' => '',
  9.     'dbname'   => 'test'
  10. ));
  11.  
  12. $select = $db->select();
  13. $select->from('test')->where('name=?', 'fulano');
  14. $data = $db->fetchRow($select);
  15. var_dump($data);

Saludos.