PDO

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

 



Hi,

i'm currently using PDO as it seems better than any other pg_connect and so
on...

however, i experience issue testing it.

for example the following code returns me the correct records (count and
records themselve)

> $sql ="SELECT * FROM sewe.languages;";
>
>   $result = DatabaseHandler::Prepare($sql);
>
>   //$res=DatabaseHandler::Execute($result);
>
>   $rec = DatabaseHandler::GetAll($result);
>
>   echo "Amount of records : ".count($rec)."<br/>";
>
>   for ($i = 0; $i < count($rec); $i++)
>   {
>   print "Record ID : ".$rec[$i]['id']." / Abbreviation :
> ".$rec[$i]['abbreviation']. " / Description
> :".$rec[$i]['description']."<br/>";
>   }
>
> however if i replace this simple SQL request by my function./stored
procedure like that :

> $sql = 'select * from get_languages_list("*");';

it does not work...in fact it returns me 0 as count of record, whereas under
postgreSQL pgAdmin interface the same syntax of SQL request returns me the
same result as the previous SQL " selct * from..."

so where could be the issue when PDO uses stored procedures/functions ?

thx.

-- 
Alain
------------------------------------
Windows XP SP3
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008

[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