Gracias Casuis.
Con respecto a Zend_Db_Table, tengo lo siguiente:
Código PHP:
<?php
require_once 'Zend/Db.php';
$params = array ( 'host' => 'localhost',
'username' => 'root',
'password' => '',
'dbname' => 'usuariosdb');
$db = Zend_Db::factory('pdoMysql', $params);
require_once 'Zend/Db/Table.php';
Zend_Db_Table::setDefaultAdapter($db);
class tbl_usuarios extends Zend_Db_Table {}
$table = new tbl_usuarios();
$db2 = $table->getAdapter();
$where = $db2->quoteInto('username = ?', '1613')
. $db2->quoteInto('AND id = ?', '976');
$order = 'id';
$row = $table->fetchRow($where, $order);
//print_r($row);
?>
y me arroja el siguiente error:
Código:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from, interes, actividad, celular, telefono, fax, firma, skins, skinsid,' at line 20' in C:\xampp\htdocs\Zend\Zend\Db\Adapter\Abstract.php:153 Stack trace: #0 C:\xampp\htdocs\Zend\Zend\Db\Adapter\Abstract.php(153): PDOStatement->execute(Array) #1 C:\xampp\htdocs\Zend\Zend\Db\Adapter\Abstract.php(393): Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Select), NULL) #2 C:\xampp\htdocs\Zend\Zend\Db\Table.php(407): Zend_Db_Adapter_Abstract->fetchRow(Object(Zend_Db_Select)) #3 C:\xampp\htdocs\Zend\Zend\Db\Table.php(342): Zend_Db_Table->_fetch('Row', 'username = '161...', 'id', 1) #4 C:\xampp\htdocs\Zend\Zend_Db_Table.php(25): Zend_Db_Table->fetchRow('username = '161...', 'id') #5 {main} thrown in C:\xampp\htdocs\Zend\Zend\Db\Adapter\Abstract.php on line 153
Gracias
saludos,