Re: model::query different output with different version of php - a bug or?

2007-03-22 Thread sawa
Your SQL didn't work , but I changed it a bit and this gives the same output on both machines: 'SELECT `Chassis`.`equipment_id` FROM (select `Chassis`.`equipment_id` from chassis as `Chassis` group by `Chassis`.`equipment_id` LIMIT 3) as Chassis' Note that the alias on the table in subquery is

model::query different output with different version of php - a bug or?

2007-03-20 Thread sawa
Hi, I have 2 installations of cakePHP on 2 servers. Both cakePHP versions are 1.1.13.4450 Both PHP were Version 5.2.0. Then one is updated to PHP Version 5.2.0-8+etch1. After the update, custom queries which have subqueries started giving different output. Here is the example: PHP Version 5.2.0

Re: model::query different output with different version of php - a bug or?

2007-03-20 Thread sawa
Oh, one more clarification: The query above is just illustration of what happens. The real query I use is more complicated (more subqueries included) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group.

Re: model::query different output with different version of php - a bug or?

2007-03-20 Thread Ámon Tamás
Hello, I think this is the different mysql version problem. sawa írta: Hi, I have 2 installations of cakePHP on 2 servers. Both cakePHP versions are 1.1.13.4450 Both PHP were Version 5.2.0. Then one is updated to PHP Version 5.2.0-8+etch1. After the update, custom queries which have

Re: model::query different output with different version of php - a bug or?

2007-03-20 Thread sawa
Yes, probably different php-mysql library or something similar..but it's really annoying --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: model::query different output with different version of php - a bug or?

2007-03-20 Thread jonathan.snook
Yes, it's an unfortunate side effect of using custom queries, especially when joins or nested queries are involved. For a project, I modified the core to use 0 as the alias if the table name returned didn't match a list of model names. In the database.php file, I declared a list of all available

Re: model::query different output with different version of php - a bug or?

2007-03-20 Thread wralph
I always make it a habit of explicitly stating the alias in all my queries like so: SELECT `Chassis`.`a.equipment_id` FROM (select `Chassis`.`equipment_id` from chassis as `Chassis` group by `Chassis`.`equipment_id` LIMIT 3); Which should give you an array like no matter which mysql/PHP version