Bonjour j'ai de gros problèmes avec odbc au travers de php. Des choses étranges...

Je lance une requete dans Access. elle me retourne 50 lignes. je lance la meme via php en utilisant odbc_exec, odbc_fetch_array et la j'en recupere que 14
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 
$sql = " SELECT nature_service.id,Sum(temps.nbHeure) AS SommeDenbHeure  ";
$sql.= " FROM temps, activite, nature_service ";
$sql.= " WHERE (((temps.ID_activite)=[activite].[ID]) ";
$sql.= "   AND ((activite.ID_nature_service)=[nature_service].[ID]) ";
$sql.= "   AND ((temps.jour) between #06-20-2011# and #06-26-2011#)) ";
$sql.= "   AND activite.facturable <> 1 ";
//$sql.= "   AND nature_service.ID_service = 2";
$sql.= " GROUP BY nature_service.ID_service,nature_service.id ";
$sql.= " ORDER BY  2 desc; ";
  $connection = odbc_connect($CONFIG["base"]["dsn"],"","");
  $res  = odbc_exec($connection, $sql);
  $i=0;
  while( $row = odbc_fetch_array($res))
  {
    $i++;
  }
echo $i;
si j'ajoute une clause where qui m'est utile je recois un tableau vide alors qu'acces j'ai 8 lignes resultats

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 
$sql = " SELECT nature_service.id,Sum(temps.nbHeure) AS SommeDenbHeure  ";
$sql.= " FROM temps, activite, nature_service ";
$sql.= " WHERE (((temps.ID_activite)=[activite].[ID]) ";
$sql.= "   AND ((activite.ID_nature_service)=[nature_service].[ID]) ";
$sql.= "   AND ((temps.jour) between #06-20-2011# and #06-26-2011#)) ";
$sql.= "   AND activite.facturable <> 1 ";
$sql.= "   AND nature_service.ID_service = 2";
$sql.= " GROUP BY nature_service.ID_service,nature_service.id ";
$sql.= " ORDER BY  2 desc; ";
  $connection = odbc_connect($CONFIG["base"]["dsn"],"","");
var_dump($sql);
  $res  = odbc_exec($connection, $sql);
  $i=0;
  while( $row = odbc_fetch_array($res))
  {
    $i++;
  }
echo $i;
je precise que je suis sous Windows Seven , PHP 5.3.5, Access 14.0.6112.500

Quelqu'un aurait-il une idée d'où disparaissent les lignes ? :-)