I'm not familiar with that behavior, but I can offer you another solution, which will work just fine if you need to combine two fields...
http://teknoid.wordpress.com/2008/09/04/findlist-with-three-or-combined-fields/ On Sep 24, 9:03 am, Kanten <[EMAIL PROTECTED]> wrote: > I'm trying to use the Multiple Display Field behavior as described > here:http://bakery.cakephp.org/articles/view/multiple-display-field-3 > > I run into two problems when using this: > 1. Cake generates two error messages whenever I load a page that uses > this behavior: > "SQL Error: 1064: You have an error in your SQL syntax; check the > manual that corresponds to your MySQL server version for the right > syntax to use near 'varDump' at line 1 [CORE\cake\libs\model > \datasources\dbo_source.php, line 512]" > And > "mysqli_real_escape_string() expects parameter 2 to be string, array > given [CORE\cake\libs\model\datasources\dbo\dbo_mysqli.php, line 259]" > > 2. I cannot figure out how to use a non-existent field as > $display_field. Whenever I try do this I get an error. For instance I > would like to use the field full_name, that isn't in my db table. > > My code is a folllows: > > class User extends AppModel { > > var $displayField = 'first_name'; > > var $actsAs = array('MultipleDisplayFields' => array( > 'fields' => array('first_name', 'last_name'), > 'pattern' => '%s %s' > )); > > } > > Anyone? > > /Anders, Denmark --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
