can not re-use a object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi! Sorry about the bad english :-[
I try to re-use an object that manage the mysql connections (it is code
from sugarcrm)
$db = new PearDatabase();
$var = "'" . $user_id ."'";
$pregunta = "SELECT user_name  FROM users WHERE id = $var";
$resultado = $db->query($pregunta, true, "Error filling in user array: ");
$row = $db->fetchByAssoc($resultado);
$user_name= $row['user_name'];

if i try a new query (can be the same one or an other one), i become "0"
as result and no error message
I have try to use the same $db and to create a new one, i have try to
close the descriptor
Thanks for help
pascal

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux