Comment excuter cette requete avec zend_Db...?
Merci.Code:
1
2 select label FROM infoLangue WHERE id IN (select langueId1, langueID2, langueID3 FROM utilisateurComplement WHERE utilisateurId = $id);
Version imprimable
Comment excuter cette requete avec zend_Db...?
Merci.Code:
1
2 select label FROM infoLangue WHERE id IN (select langueId1, langueID2, langueID3 FROM utilisateurComplement WHERE utilisateurId = $id);
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 try { $db = Zend_Db::factory('Pdo_Mysql', $parameters); $db->getConnection();} catch (Zend_Db_Adapter_Exception $e) { // perhaps a failed login credential, or perhaps the RDBMS is not running } catch (Zend_Exception $e) { // perhaps factory() failed to load the specified Adapter class } $result = $db->fetchAll('select label FROM infoLangue WHERE id IN (select langueId1, langueID2, langueID3 FROM utilisateurComplement WHERE utilisateurId = ?', $id);
Bonjour
Cette discussion peut vous intéresser. Il s'agit d'une méthode très générique.
http://www.developpez.net/forums/sho...d.php?t=506480
Bon travail