[fw-general] Weird bug in ZF?

2010-08-12 Thread Jigal sanders
hello i have a very weird bug. I have pasted all code here: http://pastebin.com/K5riS3ng its in the zend framework. In the beginning of the function all my values are there. But when creating the sql statement all the values are gone. Any Idea's? J. Sanders

Re: [fw-general] Weird bug in ZF?

2010-08-12 Thread Chris Riesen
On line 11 you check if the value is a db expr. Those are string,s so it always goes to else, which means it prints a ? in it, thats it. Unset on line 13 is not needed. Besides, if you have a table, defined as a Zend_Db_Table you can just to this: $table = new UserTable(); // assuming your table

Re: [fw-general] Weird bug in ZF?

2010-08-12 Thread Jan Pieper
This isn't a bug. Please have a look at http://en.wikipedia.org/wiki/Prepared_statements#Parameterized_statements with regards, Jan Pieper Original-Nachricht Datum: Thu, 12 Aug 2010 10:13:24 +0200 Von: Jigal sanders jigalroe...@gmail.com An: fw-general

[fw-general] String to Zend_Db_Select Object

2010-08-12 Thread Andrei Iarus
Hello to all,   Any ideas on how to cast/transform a string to an object of type Zend_Db_Select? Ideally, without rewriting it by hand.   Thank you very much

[fw-general] Problem upgrading to ZF10.1+ - please advise

2010-08-12 Thread gruby_karo
I started to work on a site developed with ZF1.7.3. I wanted to upgrade ZF to the newest version. And bump into some problems. I started to work my upgrades way up from the lowest to highest version. It turned out that replacing require_once 'Zend/Loader.php';

Re: [fw-general] Problem upgrading to ZF10.1+ - please advise

2010-08-12 Thread Chris Riesen
Try this: $loader-registerNamespace('Word_'); And it might just work perfectly fine. It's a plugin that gets loaded automatically, so you wont find a reference other than the file itself and maybe something about Word_ in the source. The autoloader was changed to not use all classes but only the

Re: [fw-general] Re: Rendering miscellaneous view scripts from within an action

2010-08-12 Thread Ryan Lange
On Wed, Aug 11, 2010 at 12:22 PM, Hector Virgen djvir...@gmail.com wrote: You could also use a partial. Partials handle the cloning/var-clearing for you. Also, be careful with getViewScript(), because it adds a suffix based on the context. It's .phtml by default, but it could be .ajax.phtml

Re: [fw-general] String to Zend_Db_Select Object

2010-08-12 Thread Ralph Schindler
This is not possible. For that to happen, you'd need an SQL parser/tokenizer, which there is not one in ZF. Moreover, the SQL you have is probably somewhat specific to a particular vendor implementation of SQL which, again, would make it really hard to build a parser/tokenizer that knows

[fw-general] how to retrieve Zend_Log_Writer_Db as resource from ini file

2010-08-12 Thread GMD
Hi Folks: I´m searching an example of Zend_Application_Resource_Log used with Zend_Log_Writer_Db and .ini example. TIA -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/how-to-retrieve-Zend-Log-Writer-Db-as-resource-from-ini-file-tp2322845p2322845.html

[fw-general] Poll: Should underscore prefixing of non-public elements be dropped?

2010-08-12 Thread Matthew Weier O'Phinney
ZF Coding Standards are based on PEAR's CS. That standard was developed first by Horde, then expanded by PEAR, during the PHP 4 lifecycle. PHP 4 had no concept of visibility in its object model; to provide some pseudo-visibility, PEAR CS mandated that members considered non-public should be

Re: [fw-general] String to Zend_Db_Select Object

2010-08-12 Thread Andrei Iarus
I need it for Zend_Db_Paginator. But is it possible to create such a tokeinzer that works for all standard SQL [everything that is not standard will fail]. Thanks, Ralph.   --- On Thu, 8/12/10, Ralph Schindler ralph.schind...@zend.com wrote: From: Ralph Schindler ralph.schind...@zend.com

Re: [fw-general] how to retrieve Zend_Log_Writer_Db as resource from ini file

2010-08-12 Thread Bill Karwin
On Aug 12, 2010, at 8:15 AM, GMD wrote: Hi Folks: I´m searching an example of Zend_Application_Resource_Log used with Zend_Log_Writer_Db and .ini example. I don't think this is supported yet. There are no hooks for I answered a similar question on Stack Overflow last January:

Re: [fw-general] Weird bug in ZF?

2010-08-12 Thread Jigal sanders
Hi, I realized that. I was just blinded by something. I am trying already two weeks to debug my application and something goes wrong with inserting data to my db from my form. And the problem is that: 1. It says in my screen An Error has ocurred. 2. No stack traces 3. No specific error messages

Re: [fw-general] String to Zend_Db_Select Object

2010-08-12 Thread Bill Karwin
It would be far less work to just start with a Zend_Db_Select object. The tokenizer is the easy part. The parser is harder. There are no parser generator tools for PHP, AFAIK. There's Lime, but it's abandonware and virtually undocumented. So you would have to write PHP code for an LR

Re: [fw-general] Weird bug in ZF?

2010-08-12 Thread Bill Karwin
On Aug 12, 2010, at 9:41 AM, Jigal sanders wrote: 2.Select `user`.* FROM `user` WHERE( usr_email = `em...@adres.com`) LIMIT 1 For one thing, use single-quotes for string literals. The back-ticks are for table names and column names. Regards, Bill Karwin

Re: [fw-general] Weird bug in ZF?

2010-08-12 Thread Jigal sanders
Bill please dont look at that query i typed it over in stead of copy paste it from firebug db profiler. So it cant be that. On Thu, Aug 12, 2010 at 6:59 PM, Bill Karwin b...@karwin.com wrote: On Aug 12, 2010, at 9:41 AM, Jigal sanders wrote: 2.Select `user`.* FROM `user` WHERE( usr_email =

Re: [fw-general] Weird bug in ZF?

2010-08-12 Thread Bill Karwin
On Aug 12, 2010, at 9:41 AM, Jigal sanders wrote: Hi, I realized that. I was just blinded by something. I am trying already two weeks to debug my application and something goes wrong with inserting data to my db from my form. And the problem is that: 1. It says in my screen An Error has

Re: [fw-general] Weird bug in ZF?

2010-08-12 Thread Jigal sanders
Bill Thanks for your time. Do you suggest that i paste the code below in an controllerAction and then execute it? On Thu, Aug 12, 2010 at 10:20 PM, Bill Karwin b...@karwin.com wrote: On Aug 12, 2010, at 9:41 AM, Jigal sanders wrote: Hi, I realized that. I was just blinded by something. I

Re: [fw-general] Weird bug in ZF?

2010-08-12 Thread Bill Karwin
I assumed your pastebin example showed a function insert(), I was suggesting that you add the diagnostic error_log() to this function (temporarily). You could alternatively enable the Zend_Db_Profiler so it records the SQL statements it executes. Then run your insert and see what's in

[fw-general] samples repository

2010-08-12 Thread Mike Wright
Hi all, I seem to recall that at some time back there was discussion of having a repository where examples/samples of code could be shared. Anybody have any knowledge as to where this concept went? I'm interested in adding an auth/acl framework on my current zf project and could definitely

Re: [fw-general] Weird bug in ZF?

2010-08-12 Thread Jigal sanders
Bill, According to my profiler, the insert qeury is never executed. On 13 aug. 2010, at 00:00, Bill Karwin b...@karwin.com wrote: I assumed your pastebin example showed a function insert(), I was suggesting that you add the diagnostic error_log() to this function (temporarily). You could

Re: [fw-general] Weird bug in ZF?

2010-08-12 Thread Bill Karwin
On Aug 12, 2010, at 3:08 PM, Jigal sanders wrote: According to my profiler, the insert qeury is never executed. Try fetching profilers with getQueryProfiles(null, true) to include unfinished statements (those with no end time recorded). It would be good to examine the SQL generated, so