Subversion Repositories Applications.projet

Rev

Rev 397 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 397 Rev 415
Line 182... Line 182...
182
     * @access public
182
     * @access public
183
     */
183
     */
184
    function projet( &$dbObject,  $id_projet = "")
184
    function projet( &$dbObject,  $id_projet = "")
185
    {
185
    {
186
        $this->_db = $dbObject ;
186
        $this->_db = $dbObject ;
187
        if ($id_projet != "") {
187
        if (intval($id_projet)) {
188
            $requete = "select * from projet where p_id=".$this->_db->escapeSimple($id_projet)." " ;
188
			$resultat = $this->_db->query(sprintf("SELECT * FROM projet WHERE p_id=%d -- %s",
-
 
189
												  intval($id_projet),
189
            $resultat = $this->_db->query ($requete) ;
190
												  __FILE__ . ':' . __LINE__));
190
            if (DB::isError($resultat)) {
191
            if (DB::isError($resultat)) {
191
                die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
192
                die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
192
            }
193
            }
193
            $ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ;
194
            $ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ;
Line 244... Line 245...
244
     * @return bool
245
     * @return bool
245
     * @access public
246
     * @access public
246
     */
247
     */
247
    function projetExiste( &$dbObject,  $id_projet)
248
    function projetExiste( &$dbObject,  $id_projet)
248
    {
249
    {
249
        if ($id_projet != "") {
250
        if (intval($id_projet)) {
250
            $requete = "select * from projet where p_id=".$dbObject->escapeSimple($id_projet)." " ;
251
			$resultat = $dbObject->query(sprintf("SELECT * FROM projet WHERE p_id=%d -- %s",
-
 
252
												 intval($id_projet),
251
            $resultat = $dbObject->query ($requete) ;
253
												 __FILE__ . ':' . __LINE__));
252
            if (DB::isError($resultat)) {
254
            if (DB::isError($resultat)) {
253
                die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
255
                die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
254
            }
256
            }
255
            if ($resultat->numRows() != 0) {
257
            if ($resultat->numRows() != 0) {
256
                return true ;
258
                return true ;