Re: [fw-general] Is 'zf enable layout' supported in v1.9.6

2010-03-29 Thread Ralph Schindler
No, that is a new feature of Zend_Tool 1.10. resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/" Like mentioned by jsuggs, Zend_Tool simply adds that line to your application.ini file and also creates the necessary directory for you. -ralph rls wrote: I'm using Zend Framewo

Re: [fw-general] mistyping in manual example?

2010-03-29 Thread Ralph Schindler
You are right, I've fixed it in trunk. Thanks! Ralph scs wrote: Hello, In http://framework.zend.com/manual/en/zend.controller.exceptions.html, in the last code sample: I think line 8: if (!$controller) { should be if (!$class) { Right? scs

Re: [fw-general] recurse on cascade delete

2010-03-29 Thread Ralph Schindler
Guillaume ORIOL wrote: Thank you for your advice. I am using MySQL 5 with InnoDB engine which implements cascade deletes as well as triggers. I have to confess I am not very comfortable with triggers. And the logic behind the cascade delete is fairly complex in my application. Therefore I t

Re: [fw-general] recurse on cascade delete

2010-03-29 Thread Bill Karwin
I think it would be a good idea to deprecate cascading update & delete from Zend_Db, but I suppose too many people rely on it now. Perhaps it can be a goal of Zend Framework 2.0. Regards, Bill Karwin On Mar 29, 2010, at 10:11 AM, Guillaume ORIOL wrote: Thank you for your advice. I am using

Re: [fw-general] zf tool overwrite?

2010-03-29 Thread Ralph Schindler
This is true. Ultimately, this todo was put in place before interactivity support was introduced into the Zend_Tool_Framework system. Now that interactive is supported in the CLI client, that functionality could be used to finish this feature. I'd have to agree though that it is a bug that a

[fw-general] Re: print_r and Zend_Debug::dump - Different results (source: Doctrine 2.0 Query)

2010-03-29 Thread jsuggs
Haha, well thanks for pointing out the obvious! This actually started when I was doing the following in my view topics as $topic): ?> And I was getting duplicates, so I started backtracking through the different levels (controller, service, etc) and was hoping it wasn't some obscure bug I'd

Re: [fw-general] print_r and Zend_Debug::dump - Different results (source: Doctrine 2.0 Query)

2010-03-29 Thread Hector Virgen
Zend_debug#dump() both returns the var and echoes it. print_r() with the "true" as the second param only returns the var as a string. Since you are passing the return value of Zend_Debug#dump() to die(), you are effectively echoing it twice. Update your code to look like this and it will be more c

[fw-general] print_r and Zend_Debug::dump - Different results (source: Doctrine 2.0 Query)

2010-03-29 Thread jsuggs
I have the following in my service layer: public function findAll() { $q = $this->_em->createQuery('select t from PT_Model_Topic t'); $topics = $q->getResult(); die(Zend_Debug::dump($topics)); //die('' . print_r($topics,true) . ''); return $topics;

Re: [fw-general] Navigating ZF manual

2010-03-29 Thread Hector Virgen
I agree, the navigation could use some work. Ctrl+F can only take you so far (you have to know what you're searching for). -- Hector On Mon, Mar 29, 2010 at 2:23 PM, Chris Morrell wrote: > I don't know about y'all, but whenever I'm navigating the ZF manual I get > extremely frustrated with the

[fw-general] Navigating ZF manual

2010-03-29 Thread Chris Morrell
I don't know about y'all, but whenever I'm navigating the ZF manual I get extremely frustrated with the lack of on-page navigation. For example, take a look at the Zend_Validatedocumentation and try to find one of the components in the m

Re: [fw-general] recurse on cascade delete

2010-03-29 Thread Guillaume ORIOL
Thank you for your advice. I am using MySQL 5 with InnoDB engine which implements cascade deletes as well as triggers. I have to confess I am not very comfortable with triggers. And the logic behind the cascade delete is fairly complex in my application. Therefore I tried to implement it with p

Re: [fw-general] recurse on cascade delete

2010-03-29 Thread Bill Karwin
Thanks Jared, that's good to know. It appears that version of SQLite only came out in October 2009. Kudos to the contributors of SQLite who made that feature possible! And thanks for pointing it out. There's virtually no reason to avoid using RI constraints now. The reasons to use MyISAM

RE: [fw-general] recurse on cascade delete

2010-03-29 Thread Jared Williams
Sqlite 3.6.19 and later have RI, http://www.sqlite.org/foreignkeys.html . Jared > -Original Message- > From: Bill Karwin [mailto:b...@karwin.com] > Sent: 29 March 2010 17:03 > To: fw-general@lists.zend.com > Subject: Re: [fw-general] recurse on cascade delete > > I regret implementing

Re: [fw-general] recurse on cascade delete

2010-03-29 Thread Bill Karwin
I regret implementing the cascading delete in Zend_Db_Table even for one level. It was hard to do, required a lot of code, and still doesn't work. Even fixing ZF-1103 won't be enough. It's not possible to ensure data consistency when cascading operations are implemented in PHP code. Yo

Re: [fw-general] Get query and error messages from $db->update

2010-03-29 Thread Mark Steudel
Thanks, will check it out. MS On Mon, Mar 29, 2010 at 8:33 AM, Chris Morrell wrote: > If you find yourself needing to see your SQL queries all the time, I would > recommend either attaching a logger to your application that logs all your > queries (during development—obviously you would want to

Re: [fw-general] Get query and error messages from $db->update

2010-03-29 Thread Chris Morrell
If you find yourself needing to see your SQL queries all the time, I would recommend either attaching a logger to your application that logs all your queries (during development—obviously you would want to turn this off for production), or look into the Zend_Db_Profiler_Firebug

Re: [fw-general] Get query and error messages from $db->update

2010-03-29 Thread Chris Morrell
getQuery just returns the query. getQueryParams returns an array of the parameters passed. So you need to use both to get both the query and the data passed to the query. CM On Mon, Mar 29, 2010 at 11:23 AM, Mark Steudel wrote: > Cool, will this show the combined query if I'm using parameter

Re: [fw-general] Get query and error messages from $db->update

2010-03-29 Thread Narinder Chandi
Hi. Just to give full details, I put this static function into a custom DB debug class that extends Zend_Db. Also the function (for more brute force(!) needs) accepts a boolean to force the output stream to terminate. Then, you can simply cal this function anywhere you need by: Database_Debug ::du

Re: [fw-general] Get query and error messages from $db->update

2010-03-29 Thread Mark Steudel
Cool, will this show the combined query if I'm using parameters e.g. $id = 5; $sql = "SEELCT id FROM table WHERE id = ?"; $row = $this->db->fetchOne( $sql, $i ); Will it show: SELECT id FROM table WHERE id = 5 or SELECT id FROM table WHERE id = ? Thnx On Mon, Mar 29, 2010 at 1:09 AM, Nar

RE: [fw-general] Get query and error messages from $db->update

2010-03-29 Thread Sergio Rinaudo
Very nice :) Thank you! Sergio Rinaudo > Date: Mon, 29 Mar 2010 09:09:04 +0100 > From: zfgeneral2010...@toolbox.uk.com > To: fw-general@lists.zend.com > Subject: Re: [fw-general] Get query and error messages from $db->update > > Hi. Something like this will work: > > public function dumpS

[fw-general] fomrsele

2010-03-29 Thread scs
Hello, I was giving a try to the formSelect helper in one of my forms as below: echo $this->formSelect('box_id', $this->data->box_id, null, $this->boxes); I have two questions: - option labels are not translated. There is a setTranslator() function in the helper code but I could not figure out how

[fw-general] Re: SOAP_Client - How to handle connection errors?

2010-03-29 Thread dmitrybelyakov
Not sure if i understand correctly - your previous message mas messed. Still if you wonder how to handle this - there was a hack on http://bugs.xdebug.org/view.php?id=249 XDebug issue tracker that was added to their CVS. I think you may need to update your XDebug from repository. Alternatively

[fw-general] Re: several projects library outside - newbie

2010-03-29 Thread dmitrybelyakov
Hi, Generally it's a good practice to keep your library code outside of your application. You don't need to make any symlinks - just make sure the library directory is on your php include paths by modifying php.ini or just manually in your index.php for example. You may need to change paths whe

Re: [fw-general] Get query and error messages from $db->update

2010-03-29 Thread Narinder Chandi
Hi. Something like this will work: public function dumpSQL() { $db = Zend_Db_Table::getDefaultAdapter(); $dbProfiler = $db->getProfiler(); $dbQuery = $dbProfiler->getLastQueryProfile(); $dbSQL= $dbQuery->getQuery(); print_r($dbSQL); } Regards, Na

[fw-general] Re: Hardcoded text inside Zend Framework : how to translate them?

2010-03-29 Thread electrotype
Thanks for the reply Gregory Cheung. Do you suggest I have to redefine *every* error message, for every Zend validator I may use? Also: if I update the framework one day,I will have to scan all validators to manually check if an error message has been added, right? -- View this message in co

[fw-general] Re: Re: re[fw-general] source vs. pluginresource

2010-03-29 Thread raj todkari
No issues After spending few hours on this, I am able to get out of the rid of "Circular resource dependency detected" error. Found interesting thing, might be useful for someone... Don't use the resource name ending in a method name e.g. if you are trying to initialize 'locale' resource in

[fw-general] recurse on cascade delete

2010-03-29 Thread Guillaume ORIOL
Hi, I was working on an application that uses cascade delete and discovered a bug that was already known and reported. I was wondering why the corresponding issue http://zendframework.com/issues/browse/ZF-1103 had not been closed and included in a previous ZF release, as a patch was provided a

Re: [fw-general] Get query and error messages from $db->update

2010-03-29 Thread scs
I would suggest you to enable db profiler and see the queries on your firephp console. scs On Mon, Mar 29, 2010 at 11:59 AM, Sergio Rinaudo wrote: > Yes, ok for the try-catch to get exceptions and to echo a select query, > but if I want to get the update query string? > > > Sergio Rinaudo > > >

RE: [fw-general] Get query and error messages from $db->update

2010-03-29 Thread Sergio Rinaudo
Yes, ok for the try-catch to get exceptions and to echo a select query, but if I want to get the update query string? Sergio Rinaudo > Date: Mon, 29 Mar 2010 11:13:04 +0300 > From: sasc...@gmail.com > To: kaiohken1...@hotmail.com > CC: fw-general@lists.zend.com > Subject: Re: [fw-general] G

Re: [fw-general] Get query and error messages from $db->update

2010-03-29 Thread scs
If you form the query in the following way $filter = $this->select()->from($this->_name, array('id', 'label')); then you can echo it directly echo $filter; And if there is a db/sql syntax error, it already throws exception. For example, let's say you do not have a field named "idd" in your table s

[fw-general] Get query and error messages from $db->update

2010-03-29 Thread Sergio Rinaudo
Hi everybody, if I construct an update query programmatically using Zend_Db, how can I get this query and how to get what is the problem if the query fails? Thanks Sergio Rinaudo _ Chiam

[fw-general] mistyping in manual example?

2010-03-29 Thread scs
Hello, In http://framework.zend.com/manual/en/zend.controller.exceptions.html, in the last code sample: I think line 8: if (!$controller) { should be if (!$class) { Right? scs

[fw-general] Re: Re: re[fw-general] source vs. pluginresource

2010-03-29 Thread raj todkari
Hi, Why we can't use following to load locale resource $this->bootstrap('locale'); $locale = $this->getResource('locale'); Instead of locale = new Zend_Locale('en_GB'); -- View this message in context: http://n4.nabble.com/resource-vs-pluginresource-tp648906p1694792.html Sent from the Zend