well it seems this might be a php thing, not a CakePhp issue. I've tracked the problem to resultSet function in dbo_mysql.php. The mysql_fetch_field returns different results on the localhost vs the online server. I can only assume the function might have been changed in a newer version of php to return the table of the alias name, not the original tables.
Not sure how to handle this error yet... maybe this info might help someone. On May 8, 11:42 am, Eleazar <[email protected]> wrote: > in my search for the origination of this strange behaviour I've come > accross a lead. > Debugging the dbo source object reveals that the [map] array of the > fields is different between the two servers. The one has the fields > mapped to the appropriate tables while the other maps the fields to > 't2' as in my first post. I'm not a cake developer. Does anyone know > where this mapping info gets set? I'll keep looking into it. > > Thanks > > On May 8, 7:56 am, Dilip Godhani <[email protected]> wrote: > > > > > hello > > This is relationship problem can u upload model on server? > > > On Fri, May 7, 2010 at 11:15 PM, Eleazar <[email protected]> wrote: > > > Hi all, > > > I run a custom query > > > SELECT * FROM > > > (SELECT `$wb`.`blocks_us_id`, `$wb`.`date`, > > > `$wb`.`fcap`, `$wb`.`rzm`, `Farm`.`fname`, > > > `$bl`.`name`, `$bl`.`group`, `$bl`.`area` > > > FROM `$wb` AS `$wb` > > > LEFT JOIN `farms` AS `Farm` ON (`$wb`.`farm_id` = > > > `Farm`.`id`) > > > LEFT JOIN `blocks_us` AS `$bl` ON (`$wb`.`$bid` = ` > > > $bl`.`id`) > > > WHERE `$wb`.`farm_id` = $id ORDER BY `date` DESC, ` > > > $bl`.`id` ASC ) t2 > > > GROUP BY $bid > > > > On my localhost the data returned is this: > > > Array > > > ( > > > [0] => Array > > > ( > > > [BalanceUs] => Array > > > ( > > > [blocks_us_id] => 1 > > > [date] => 2010-04-25 > > > [fcap] => 5.25 > > > [rzm] => 114.84 > > > ) > > > > [Farm] => Array > > > ( > > > [fname] => Nice farm > > > ) > > > > [BlocksUs] => Array > > > ( > > > [name] => Cem-Mid > > > [group] => C > > > [area] => 1.00 > > > ) > > > > ) > > > > [1] => Array > > > ( > > > etc... > > > ) > > > > But on the online server the result is this: > > > Array > > > ( > > > [0] => Array > > > ( > > > [t2] => Array > > > ( > > > [blocks_us_id] => 1 > > > [date] => 2010-04-25 > > > [fcap] => 5.70 > > > [rzm] => 1.32 > > > [fname] => Nice farm > > > [name] => Cem-Mid > > > [group] => C > > > [area] => 1.00 > > > ) > > > > ) > > > > [1] => Array > > > ( > > > etc > > > > Please help me! Why would the results differ between the online and > > > offline servers? > > > > Thanks for your time. > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others > > > with their CakePHP related questions. > > > > You received this message because you are subscribed to the Google Groups > > > "CakePHP" group. > > > To post to this group, send email to [email protected] > > > To unsubscribe from this group, send email to > > > [email protected]<cake-php%[email protected]>For > > > more options, visit this group at > > >http://groups.google.com/group/cake-php?hl=en > > > -- > > Dilip Godhani > > Jr Software Developer, Entourage Solutions > > e-mail: [email protected] > > [email protected] > > Web.:www.entouragesolutions.com > > m. 9913822582 > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] For more options, visit this group > > athttp://groups.google.com/group/cake-php?hl=en > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] For more options, visit this group > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
