Hola,

Je rencontre l'erreur suivante:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
Warning: ora_fetch() [function.ora-fetch]: Ora_Fetch failed (ORA-01861: literal does not match format string -- while processing OCI function OFETCH/OFEN)
Avec le code ci-dessous:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
 
<?php
 
if(isset($_POST["FechaIniDD"]) && !empty($_POST["FechaIniDD"]) && is_numeric($_POST["FechaIniDD"]) ){
 
	$FechaIni = $_POST["FechaIniDD"].$_POST["FechaIniMM"].$_POST["FechaIniYY"];
	$FechaFin = $_POST["FechaFinDD"].$_POST["FechaFinMM"].$_POST["FechaFinYY"];
 
$conn = ora_logon('ZZZ@XXX', 'YYYY');
 
if (!$conn) {
  $e = ora_error();
  print htmlentities($e['message']);
  exit;
}
 
$cursor = ora_open($conn);
 
$query = "SELECT NOM_CRUCERO, COD_CRUCERO, COD_EMBARCACION, NOM_EMBARCACION  
	FROM V_PARAMETROSFISICO_QUIMICO
	WHERE COD_INSTRUMENTO=091003
	AND FECHA>TO_DATE(".$FechaFin.",'DD/MM/YYYY')";
 
echo $query;
 
$stid = ora_parse($cursor, $query);
if (!$stid) {
  $e = ora_error($conn);
  print htmlentities($e['message']);
  exit;
}
 
$r = ora_exec($cursor);
if (!$r) {
  $e = ora_error($stid);
  echo htmlentities($e['message']);
  exit;
}
 
$extension = $_POST["formato"];
$filename = "test.".$extension;
 
$fp = fopen($filename,"a+");
 
//  get each row
while(ora_fetch($cursor)){
	for($index = 0; $index < ora_numcols($cursor); $index++){ 
		$content = (ora_getcolumn($cursor,$index));
		fputs($fp,$content);
		fputs($fp,";");
	}
	fputs($fp,"\n");
}
 
print("Rows: ");
print(ora_numrows($cursor));
 
fclose($fp);
 
ora_close($cursor);
ora_logoff($conn);
Une idée ?

Merci d'avance.