[fw-general] Pls help with unwanted quotes in db-queries

2013-04-19 Thread GJ Bogaerts
Hello all, I'm having some trouble removing quotes from certain parts of my db-queries. For instance, this is part of a select()-statement: $select-join(array('m' = 'media'), m.foreignKey = p.id and m.belongsTo='product', array('mediaType', 'media' = $paths), $select::JOIN_LEFT); The on-part of

Re: [fw-general] Pls help with unwanted quotes in db-queries

2013-04-19 Thread Ralph Schindler
$select-join(array('m' = 'media'), m.foreignKey = p.id and m.belongsTo='product', array('mediaType', 'media' = $paths), $select::JOIN_LEFT); The on-part of this join produces: `m`.`foreignKey` = `p`.`id` and `m`.`belongsTo` = `'product'` - the backticks around product are actually invalid in

[fw-general] Re: Pls help with unwanted quotes in db-queries

2013-04-19 Thread GJ Bogaerts
Thank you, I will look into those examples. ralphschindler wrote And on a related issue: In Zf1 you were able to provide a data-type with any query-part, so you were able to actually use optimal data-types for your database (i.e. an int was treated as int). Now even an int gets quoted,

Re: [fw-general] Re: Pls help with unwanted quotes in db-queries

2013-04-19 Thread Ralph Schindler
is, I think, much slower than select * from xyz where id=534, especially if the id is datatyped as int in Mysql, and even more so when there is an index on that column. Where does mysql document this performance optimization? Everything I see says this is a micro-optimization at best.

[fw-general] Re: Pls help with unwanted quotes in db-queries

2013-04-19 Thread GJ Bogaerts
Well, it might be a misconception on my part; however there's this in the mysql docs: https://dev.mysql.com/doc/refman/5.5/en/optimize-numeric.html and there's this thread on stackoverflow: http://stackoverflow.com/questions/4918512/disadvantages-of-quoting-integers-in-a-mysql-query So the deal

Re: [fw-general] Re: Pls help with unwanted quotes in db-queries

2013-04-19 Thread Ralph Schindler
Hi, So the deal here (in my case): if I want to join on numeric columns (and that are datatyped as such in mysql), the conversion doesn't take that much time in small tables; however, in large ones, it will add up. It's just that I don't know the reasoning behind the omission of this feature

[fw-general] Re: Pls help with unwanted quotes in db-queries

2013-04-19 Thread GJ Bogaerts
I think it does. Thank you so much! GJ -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Pls-help-with-unwanted-quotes-in-db-queries-tp4659783p4659793.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: fw-general@lists.zend.com