Rechercher : dans
Par :

Problème ODBC_RESULT

miky97x, le 16 nov 2009 à 15:11:03 
 Signaler ce message aux modérateurs

Bonjour,

J'ai un petit problème sur mon code, j'effectue une liaison odbc sur une base de donnée et j'ai un problème qui me bloque réellement.
Sur ma page php voici ce que j'ai comme erreur :
Warning: odbc_result() [function.odbc-result]: Field index is larger than the number of fields in C:\Program Files\EasyPHP\www\verif-cod.php on line 35

Warning: odbc_result() [function.odbc-result]: Field index is larger than the number of fields in C:\Program Files\EasyPHP\www\verif-cod.php on line 36

Warning: odbc_result() [function.odbc-result]: Field index is larger than the number of fields in C:\Program Files\EasyPHP\www\verif-cod.php on line 37


et voici mon code :
if ( isset($_POST['client']) || isset($_POST['dossier']) && isset($_POST['mot_de_passe']) ); // Si la variable existe
{
// Variable $code_client et $mot_de_passe avec le mot de passe entré
if (isset ($_POST['dossier']))
{
$dossier = $_POST['dossier'];
}
if (isset ($_POST['client']))
{
$code_client = $_POST['client'];
}
if (isset ($_POST['mot_de_passe']))
{
$mot_de_passe = $_POST['mot_de_passe'];
}
}

$dossier = strtoupper($dossier);

$code_client = strtoupper($code_client);
$conn=odbc_connect("BDAPI","","") or die ("echec connexion");
$requete = "SELECT CODCLI,RAICLI, NUMSAV FROM ENTSAV WHERE CODCLI ='$code_client'";
$resultat = odbc_exec($conn,$requete);
$CODCLI = odbc_result($resultat,"CODCLI");
$NUMSAV = odbc_result($resultat,"NUMSAV");
$RAICLI = odbc_result($resultat,"RAICLI");

J'ai une erreur avec odbc_result et j'aimerai savoir quoi faire.

HELP ME.

Cordialement,

Miky

Collection CommentÇaMarche.net