How do I code the correct database adapter into a model class that extends
the Zend_Db_Table_Abstract?
I am using Zend_Application_Resource_Multidb in my config in
application/configs/application.ini:
-
resources.multidb.db1.adapter = pdo_mysql
Hi All,
dont know if this is a bug or not but if you pass the following parameters
to the limit method on select object like so:
-limit(0, 10);
It produces the following SQL:
LIMIT 2147483647 OFFSET 10
now i know you should vaidate the limit val beforehand but this could
potentially kill
Good day
dont know if this is a bug or not but if you pass the following parameters
to the limit method on select object like so:
-limit(0, 10);
It produces the following SQL:
LIMIT 2147483647 OFFSET 10
now i know you should vaidate the limit val beforehand but this could
Hi,
I know what your saying but my point is that, is this intended behaviour to
return a number so large if a zero happend to be passed.?
Thanks
Daniel.
2010/10/3 Valeriy Yatsko d...@design.ru
Good day
dont know if this is a bug or not but if you pass the following
parameters
to the
Limit 0 us definitely an incorrect usage, so maybe an exception should be
thrown?
--
Hector Virgen
Sent from my Droid X
On Oct 2, 2010 5:15 PM, Daniel Latter dan.lat...@gmail.com wrote:
Hi,
I know what your saying but my point is that, is this intended behaviour
to
return a number so large if
The example I am thinking of is an app could very well have millions of
rows, and if you did happen to pass a zero you would most probably end up
killing the server with an out of memory error, or timeout issues... and
thus bring you app crashing down.
Daniel.
2010/10/3 Daniel Latter
or just throw away the limit part altogether?
Daniel
On 3 October 2010 01:17, Hector Virgen djvir...@gmail.com wrote:
Limit 0 us definitely an incorrect usage, so maybe an exception should be
thrown?
--
Hector Virgen
Sent from my Droid X
On Oct 2, 2010 5:15 PM, Daniel Latter
Good day
The example I am thinking of is an app could very well have millions of
rows, and if you did happen to pass a zero you would most probably end up
killing the server with an out of memory error, or timeout issues... and
thus bring you app crashing down.
Judging with protected
So limit 0 (or limit null, or limit false) would remove the limit portion if
the query?
--
Hector Virgen
Sent from my Droid X
On Oct 2, 2010 5:21 PM, Daniel Latter dan.lat...@gmail.com wrote:
or just throw away the limit part altogether?
Daniel
On 3 October 2010 01:17, Hector Virgen
OK, so it doesnt seem to be a bug judging by what Valeriy said and the link
posted but i think this maybe a bit drastic, as Hector said I think limit 0,
null or false should just remove or even dont add the limit part?
Daniel.
On 3 October 2010 01:24, Hector Virgen djvir...@gmail.com wrote:
So
Regardless of how it actually works, I would expect limit null or limit
false to remove the limit portion if the query, while limit 0 would do an
actual limit 0. Having it do a limit 2.1 bajillion is just strange and
unexpected behavior.
Just my 2c.
--
Hector Virgen
Sent from my Droid X
On Oct
Good day
So limit 0 (or limit null, or limit false) would remove the limit portion if
the query?
True.
As long as you have entries amount less than PHP_INT_MAX (which is different
for 32-bit and 64-bit systems).
Mac OS X Snow Leopard 10.6.4 (64 bit)
dwr:~ dwr$ php intmax.php
Yes, but it doesnt seem right to assume someones app will have the same
amount or rows that is equesl to the max integer the os can hold?
Daniel
2010/10/3 Valeriy Yatsko d...@design.ru
Good day
So limit 0 (or limit null, or limit false) would remove the limit portion
if
the query?
Good day
Yes, but it doesnt seem right to assume someones app will have the same
amount or rows that is equesl to the max integer the os can hold?
You really have table larger than 2 000 000 000 entries on 32-bit servers? :)
Let's see... int = 4 bytes on 32 bit systems:
2 000 000 000 x 4 = 8
The simplest way to do this is to not extend Zend_Db_Table_Abstract. In ZF,
tables are not models. I've gone down this route personally and it's very
difficult to do anything slightly complex loo ike dealing with multiple
tables.
Instead, I suggest creating a model that doesn't extend a base
15 matches
Mail list logo