2008年7月30日星期三

Re: [fw-db] Oracle cursors returned from stored procedures

**BUMP**

Has anyone worked with Oracle stored procedures that return result sets?


tr0gd0rr wrote:
>
> Does anyone know of a way in Zend_Db to iterate cursors returned from
> stored procedures in Oracle?
>
> I see http://us.php.net/manual/en/function.oci-bind-by-name.php#83094
> this example of using oci_new_cursor() on php.net , but I don't see
> "oci_new_cursor" anywhere in the Zend source.
>
> Any help is appreciated.
>

--
View this message in context: http://www.nabble.com/Oracle-cursors-returned-from-stored-procedures-tp18634078p18734276.html
Sent from the Zend DB mailing list archive at Nabble.com.

Re: [fw-webservices] Zend_Rest_Server and Zend_Rest_Client error

Ok. sorry.

2008/7/30 Matthew Weier O'Phinney <matthew@zend.com>
Please do not cross post -- or, if you do, do so using CC.

I've answered this on fw-general already.

-- Adler Medrado <adlermedrado@gmail.com> wrote
(on Wednesday, 30 July 2008, 10:12 AM -0300):
> Hello All.
>
> I am trying to create a Zend_Rest_Server but it is not working and always
> return a response like that:
> <rest generator="zend" version="1.0">
> <response>
> <message>An unknown error occured. Please try again.</message>
> </response>
> <status>failed</status>
> </rest>
>
> Does anyone have some example? i think i am doing someting wrong but i am
> following the Documentation and i do not know where i can look for other
> tutorial/ code example.
>
> Below follow the sources:
> Server:
> public function indexAction()
>     {
>
>         $this->_helper->viewRenderer->
> setNoRender();
>         $this->_helper->layout->disableLayout();
>
>         $server = new Zend_Rest_Server();
>         $server->setClass('Example');
>         $server->handle();
>
>     }
>
>
> Client:
> public function clientAction()
>     {
>         $this->_helper->viewRenderer->setNoRender();
>         $this->_helper->layout->disableLayout();
>
>         $client = new Zend_Rest_Client('http://localhost/form/index/index');
>         echo $client->hello('adler')->delete();
>     }
>
> Example class:
> class Example {
>     public function hello($nome)
>     {
>         return "Hello $nome";
>     }
>
> }
>
>
> --
> adler medrado
>
> Consultor
> Zend Certified Engineer #ZEND003922
> http://www.adlermedrado.com.br

--
Matthew Weier O'Phinney
Software Architect       | matthew@zend.com
Zend Framework           | http://framework.zend.com/



--
adler medrado

Consultor
Zend Certified Engineer #ZEND003922
http://www.adlermedrado.com.br

Re: [fw-webservices] Zend_Rest_Server and Zend_Rest_Client error

Please do not cross post -- or, if you do, do so using CC.

I've answered this on fw-general already.

-- Adler Medrado <adlermedrado@gmail.com> wrote
(on Wednesday, 30 July 2008, 10:12 AM -0300):
> Hello All.
>
> I am trying to create a Zend_Rest_Server but it is not working and always
> return a response like that:
> <rest generator="zend" version="1.0">
> <response>
> <message>An unknown error occured. Please try again.</message>
> </response>
> <status>failed</status>
> </rest>
>
> Does anyone have some example? i think i am doing someting wrong but i am
> following the Documentation and i do not know where i can look for other
> tutorial/ code example.
>
> Below follow the sources:
> Server:
> public function indexAction()
> {
>
> $this->_helper->viewRenderer->
> setNoRender();
> $this->_helper->layout->disableLayout();
>
> $server = new Zend_Rest_Server();
> $server->setClass('Example');
> $server->handle();
>
> }
>
>
> Client:
> public function clientAction()
> {
> $this->_helper->viewRenderer->setNoRender();
> $this->_helper->layout->disableLayout();
>
> $client = new Zend_Rest_Client('http://localhost/form/index/index');
> echo $client->hello('adler')->delete();
> }
>
> Example class:
> class Example {
> public function hello($nome)
> {
> return "Hello $nome";
> }
>
> }
>
>
> --
> adler medrado
>
> Consultor
> Zend Certified Engineer #ZEND003922
> http://www.adlermedrado.com.br

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

[fw-webservices] Zend_Rest_Server and Zend_Rest_Client error

Hello All.

I am trying to create a Zend_Rest_Server but it is not working and always return a response like that:
<rest generator="zend" version="1.0">
<response>
<message>An unknown error occured. Please try again.</message>
</response>
<status>failed</status>
</rest>

Does anyone have some example? i think i am doing someting wrong but i am following the Documentation and i do not know where i can look for other tutorial/ code example.

Below follow the sources:
Server:
public function indexAction()
    {

        $this->_helper->viewRenderer->
setNoRender();
        $this->_helper->layout->disableLayout();

        $server = new Zend_Rest_Server();
        $server->setClass('Example');
        $server->handle();

    }


Client:
public function clientAction()
    {
        $this->_helper->viewRenderer->setNoRender();
        $this->_helper->layout->disableLayout();

        $client = new Zend_Rest_Client('http://localhost/form/index/index');
        echo $client->hello('adler')->delete();
    }

Example class:
class Example {
    public function hello($nome)
    {
        return "Hello $nome";
    }
   
}


--
adler medrado

Consultor
Zend Certified Engineer #ZEND003922
http://www.adlermedrado.com.br

[fw-db] Zend_Db_Table Column Alias Map

Hi,

I just create *NEW* proposal to Zend Framework. The proposal are placed in http://framework.zend.com/wiki/display/ZFPROP/Zend_Db_Table+Column+Alias+Map.

Many ORM needs map name of column difent of attribute name of object. Now in the Zend_Db_Table_Row_Abstract it isn't possible. Many developer implements a Zend_Db_Table_Row_Abstract class to make it, and many times these implementation is not good and not produtive. This component make it a way vary simple.

Regards
--
Fernando Chucre - LPIC-1
http://www.horizontesdigitais.com

Re: [fw-db] SQL debug please

Tobias Gies wrote:
>
> This option already exists. Check the manual for the Zend_Db_Profiler.
>
> Best regards
> Tobias
>
>

I'd like to debug queries that are causing exceptions (i.e. my SQL is
broken) how do I see the SQL that is being generated here?

For example, I think I have a bug where it is replacing '?' with an odd
value which is causing invalid SQL, but all I get is an exception and no
db_profile sql... :-(

Thanks,

monk.e.boy
--
View this message in context: http://www.nabble.com/SQL-debug-please-tp18728846p18731637.html
Sent from the Zend DB mailing list archive at Nabble.com.

Re: re[2]: [fw-db] Using the Zend_Db_Table to return referenced row values

Indeed PDO is much more readable - with a good indentation implemented. I
think there is definitely a place for Db Object Models one just has to find
a balance between the two ie. when it is appropriate and convienient to go
the object way or to simply stick to plain sql. I find plain sql much more
simpler especially when you have written and testing your queries before
hand. You simply copy and paste and not have to worry about the intricacies
of how a Frameworks interpretes nested joins or queries :)

Am using a combination of both for now.

monk.e.boy wrote:
>
> >> Your query is this:
>
> I ask thee, which is easier to read and understand? ::
>
>
> $sql = <<<EOT
>
>
> SELECT e.eventName, v.VenueName, c.City
> FROM EventVenue ev
> LEFT JOIN Event e ON ev.eventid=e.eventid
> LEFT JOIN Venue v ON ev.venueid=v.venueid
> LEFT JOIN Area a ON e.areaid=a.areaid
> LEFT JOIN City c ON a.cityid=c.cityid;
>
> EOT;
>
> ---- or ----
>
> $sql = $this->select()->setIntegrityCheck(false)
> ->from($this, array() )
> ->joinLeftUsing( array('e'=>'Event'), 'EventId', array('EventName') )
> ->joinLeftUsing( array('v'=>'Venue'), 'VenueId', array('VenueName') )
> ->joinLeft( array('a'=>'Area'), 'e.AreaId = a.AreaId', array() )
> ->joinLeft( array('c'=>'City'), 'a.CityId = c.CityId', array('City')
> );
>
> Object models are a neat idea, but good god, the code is a mess. It's
> starting to look like Perl....
>
> monk.e.boy
>


-----
dee
--
View this message in context: http://www.nabble.com/re-2-%3A--fw-db--Using-the-Zend_Db_Table-to-return-referenced-row-values-tp18728740p18729744.html
Sent from the Zend DB mailing list archive at Nabble.com.