Hello,

I have a error message in cake v1.1.16 and 1.1.17:

Query: SELECT `Painting`.`year` FROM `paintings` AS `Painting` LEFT
JOIN `places` AS `Place` ON (`Painting`.`place_id` = `Place`.`id`)
LEFT JOIN `compositions` AS `Composition` ON
(`Painting`.`composition_id` = `Composition`.`id`) LEFT JOIN `formats`
AS `Format` ON (`Painting`.`format_id` = `Format`.`id`) WHERE `id` IN
'(1782,1938,3440)' ORDER BY `Painting`.`year` ASC

Warning: 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 ''(1782,1938,3440)' ORDER BY `Painting`.`year` ASC'
at line 1 in /Users/janos/Sites/dc/cake/libs/model/datasources/
dbo_source.php
on line 463

So I think I don't need single quotes around the brackets. My code is
the follow:
$this->findAll(sizeof($paintingIDs)>0?array('id'=>'IN
('.implode(',',$paintingIDs).')'):null,'Painting.year','Painting.year
ASC');

Somebody found this problem already?

Cheers,
csikosjanos


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to