Update library/Zend/Db/Adapter/Platform/Mysql.php #2392

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@albulescu
Contributor

albulescu commented Sep 20, 2012

For future versions of mysql you dont need to quote numbers.

The issue was when i use db->limit(10), in Select::processOffset
the limit and offset is quoted with quoteValue.

Update library/Zend/Db/Adapter/Platform/Mysql.php
For future versions of mysql you dont need to quote numbers.

The issue was when i use db->limit(10), in Select::processOffset 
the limit and offset is quoted with quoteValue.

@ghost ghost assigned ralphschindler Sep 20, 2012

@ralphschindler

This comment has been minimized.

Show comment Hide comment
@ralphschindler

ralphschindler Sep 22, 2012

Member

I don't think this is the right approach to the limit/offset problem MySQL has with unquoted values. By doing this, it will not quote values in other places like if someone were to produce, for example, an INSERT with values.

Member

ralphschindler commented Sep 22, 2012

I don't think this is the right approach to the limit/offset problem MySQL has with unquoted values. By doing this, it will not quote values in other places like if someone were to produce, for example, an INSERT with values.

@albulescu

This comment has been minimized.

Show comment Hide comment
@albulescu

albulescu Sep 22, 2012

Contributor

Yes you are right, maybe the correct aproach is in the processOffset and processLimit...

Contributor

albulescu commented Sep 22, 2012

Yes you are right, maybe the correct aproach is in the processOffset and processLimit...

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Oct 7, 2012

I just came accross with this issue. Can this be just pass an optional second argument within quoteValue to represent where the value will be going.

$platform->quoteValue($this->limit, 'limit');

then we can know if the value we are quoting is a column value or a part of limit in a platform specific way.

ghost commented Oct 7, 2012

I just came accross with this issue. Can this be just pass an optional second argument within quoteValue to represent where the value will be going.

$platform->quoteValue($this->limit, 'limit');

then we can know if the value we are quoting is a column value or a part of limit in a platform specific way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment