Exception reçue

DBStatement::execute() statement fail :

SELECT COUNT(*) AS `count` FROM `we_guide` WHERE (id IN (SELECT guide_id FROM we_guide_x_etape WHERE etape_id IN ()) AND we_guide.id IN (SELECT we_guide_x_theme.guide_id FROM we_guide_x_theme WHERE we_guide_x_theme.theme_id="7")) ORDER BY RAND() LIMIT 1

Array
(
    [0] => 42000
    [1] => 1064
    [2] => 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 ')) AND we_guide.id IN (SELECT we_guide_x_theme.guide_id FROM we_guide_x_theme WH' at line 1
)

								/var/www/vhosts/52we.com/httpdocs/core/vendors/j4mie/idiorm.php @ line 413 
								DBStatement->execute()
								Parameters : Array
(
    [0] => Array
        (
            [0] => 7
        )

)
								
								/var/www/vhosts/52we.com/httpdocs/core/vendors/j4mie/idiorm.php @ line 1639 
								ORM::_execute()
								Parameters : Array
(
    [0] => SELECT COUNT(*) AS `count` FROM `we_guide` WHERE (id IN (SELECT guide_id FROM we_guide_x_etape WHERE etape_id IN ()) AND we_guide.id IN (SELECT we_guide_x_theme.guide_id FROM we_guide_x_theme WHERE we_guide_x_theme.theme_id=?)) ORDER BY RAND() LIMIT 1
    [1] => Array
        (
            [0] => 7
        )

    [2] => default
)
								
								/var/www/vhosts/52we.com/httpdocs/core/vendors/j4mie/idiorm.php @ line 582 
								ORM->_run()
								Parameters : Array
(
)
								
								/var/www/vhosts/52we.com/httpdocs/core/vendors/j4mie/paris.php @ line 118 
								ORM->find_one()
								Parameters : Array
(
    [0] => 
)
								
								/var/www/vhosts/52we.com/httpdocs/core/vendors/j4mie/idiorm.php @ line 709 
								ORMWrapper->find_one()
								Parameters : Array
(
)
								
								/var/www/vhosts/52we.com/httpdocs/core/vendors/j4mie/idiorm.php @ line 659 
								ORM->_call_aggregate_db_function()
								Parameters : Array
(
    [0] => count
    [1] => *
)
								
								/var/www/vhosts/52we.com/httpdocs/apps/classes/We/Etablissement.php @ line 116 
								ORM->count()
								Parameters : Array
(
)
								
								/var/www/vhosts/52we.com/httpdocs/apps/classes/We/Etablissement.php @ line 103 
								We_Etablissement->nearest_guides()
								Parameters : Array
(
    [0] => 50
    [1] => 10
    [2] => 10
    [3] => 7
)
								
								/var/www/vhosts/52we.com/httpdocs/pages/etb.php @ line 132 
								We_Etablissement->nearest_guides_for_theme()
								Parameters : Array
(
    [0] => 7
    [1] => 50
    [2] => 10
    [3] => 10
)
								
								/var/www/vhosts/52we.com/httpdocs/core/classes/Page.php @ line 228 
								Function : include()
								Parameters : Array
(
    [0] => /var/www/vhosts/52we.com/httpdocs/pages/etb.php
)
								
								/var/www/vhosts/52we.com/httpdocs/core/classes/Template.php @ line 23 
								Page::load()
								Parameters : Array
(
    [0] => 
    [1] => 
)
								
								/var/www/vhosts/52we.com/httpdocs/index.php @ line 62 
								Template::display()
								Parameters : Array
(
)