2009年4月13日星期一

RE: [fw-db] Zend_Db_Table_Abstract question

Hey,

If your using the default fetch mode which is the ASSOC that just do:
$sqlResult = $this->sqlLink->fetchAll("select test from tablename");

Echo $selResult['test'];

The protected data property will hold down the results. Using the magic methods you will be able to access them by simply calling them as shown above.

Vince.


Vadim Gabriel.
Lead Developer, Senior Support.
Zend Certified Engineer PHP 5.
Zend Framework Certified Engineer.


-----Original Message-----
From: András Csányi [mailto:sayusi.ando@gmail.com]
Sent: Monday, April 13, 2009 12:36 PM
To: fw-db@lists.zend.com
Subject: [fw-db] Zend_Db_Table_Abstract question

Hi all!

I'm using Zend_Db_Table_Abstract to manage my database operations and
I have an question. A silly question very much :)
I have read the documentation 2 times but I didn't find solution for my problem.

So, I have an table (just like grid) and at first time I have to show
all of data just like "select * from view"
So, I did:
$sqlResult = $this->sqlLink->fetchAll()

But I don't know how can I get the result arrays! If I dumped the
$sqlResult variable (var_dump($sqlResult)) I can see under "protected
'_data'" property the result arrays.
I've read the documentation but I didn't find anything for this.

I'm sorry about my stupid question.

Thanks for the help!

András

--
- -
-- Csanyi Andras -- http://sayusi.hu -- Sayusi Ando
-- "Bízzál Istenben és tartsd szárazon a puskaport!".-- Cromwell

没有评论: