Ok, I put this together in a test action, completely separate from anything
to do with the rest of my code base, just to be sure it's pdo..
// $conn = Zend_Db::factory('Pdo_Pgsql', $connArgs);
$conn = new PDO('pgsql:host=localhost;dbname=devdb', 'postgres',
'');
$statement = $conn->query("select now()");
echo "<pre>";
echo print_r($statement->fetchAll(), true);
echo "</pre>";
$conn = null;
That script doesn't ...
Eh, hmm. Nope, that script works fine. Poo. So the problem is with my
code, somehow. Awesome. Meh, yeah, it works with Zend_Db, etc., too.
Well, on the bright side, now zend / php / pdo has been specifically
tested.
On Tue, Oct 16, 2012 at 8:35 PM, Michael Paquier
<mic...@gm...>wrote:
>
>
> On Wed, Oct 17, 2012 at 12:09 PM, Shavais Zarathustra <sh...@gm...>wrote:
>
>>
>> I've been trying to get the php pdo driver for postgres (php extension
>> pdo_pgsql.so) to work with postgres-xc today, so far with no luck. It
>> seems to give me a valid connection, but when I try to use
>> $conn->query($sql) or $stmt = $conn->prepare(..) .. $stmt->execute(), no
>> exceptions are thrown, even for obviously incorrect sql, and no results are
>> fetchable even for trivial sql. From the terminal, psql is working fine, I
>> can connect and run sql statements and so on, so it seems like the cluster
>> is operating and so forth.
>>
> I haven't used php with XC for a certain amount of time, but as XC uses
> the same connection interface as Postgres, so I do not see why it shouldn't
> work. For example I did some tests with jdbc and perl drivers this week and
> it was working correctly.
> Could you give an example of the SQLs that are not working? Or even a
> script?
> --
> Michael Paquier
> http://michael.otacoo.com
>
|