ConnexionConnexionInscription
B E A D G
222 connectés Aller à Sweepyto Guitare

Problème en PHP

#1
10/03/2005 14:58:55
Bonjour, bon ça n'a rien à voir avec la basse mais bon , je dois rendre un programme PHP très bientôt et je vois pas comment corriger le problème que j'ai :

Voilà le code >>

<?php

class Station {

var $connexion;

function Station($connex){
$this->connexion = $connex;
}

function set($connex){
$this->connexion = $connex;
}

function get(){
return $this->connexion;
}


function getInfoStation($name){

$query = "SELECT * FROM Station where NOMSTAT=$name";
$res = $this->connexion->query($query);

while($ligne = $res->fetchRow(DB_FETCHMODE_OBJECT)){


if( DB::isError($res) ){
die($res->getMessage());
}

$tabstation[] = array($ligne->NOMSTAT,$ligne->ALTSTAT,$ligne->PAYSTAT,$ligne->CAPSTAT);

}



return $tabstation;

}




function listerStation(){
$query = "SELECT * FROM Station";
$res = $this->connexion->query($query);
while($ligne = $res->fetchRow(DB_FETCHMODE_OBJECT)){

if( DB::isError($res) ){
die($res->getMessage());
}

$tabstation[] = array($ligne->NOMSTAT,$ligne->ALTSTAT,$ligne->PAYSTAT,$ligne->CAPSTAT);

}



return $tabstation;


}

}


?>
0
0
#2
10/03/2005 15:00:15
Le problème est :

Fatal error: Call to undefined function: fetchrow() in /users/etude/deux/jacob030/windows/www/Station.php on line 25


ou


Fatal error: Call to undefined function: fetchrow() in /users/etude/deux/jacob030/windows/www/Skieur.php on line 25




J'ai le même genre de problème pour la classe Skieur.

Donc le problème est très bizarre vu que j'utilise le fetchRow pour lister et qu'il marche....

Merci bcp d'avance pour l'aide !
0
0
#3
10/03/2005 16:01:20
vas essayé sur http://www.phpdebutant.org/

tu t'es forcement planté sur le fetchRow()
0
0

En Live