Bonjour,
Comment faire pour afficher le résultat (en l'occurrence un seul) sans utiliser un foreach ? un peu comme avec mysql_num_rows.
Merci pour votre aide.
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 <?php $oci_conn = oci_connect("toto","toto","base"); $req1 = oci_parse($oci_conn, "SELECT count(distinct aecar2) as total FROM ieps2, iepas, iepae, iepre WHERE recsoc = 'RA' AND recent = '43' AND recmag IN ('EPD', 'PPD','RPD') AND aecsoc(+) = recsoc AND aecent(+) = recent AND aeniar(+) = reniar AND ascsoc(+) = recsoc AND asniar(+) = reniar AND s2csoc(+) = aecsoc AND s2cdty(+) = 'PS' AND s2cpa2(+) = aecpa2"); oci_execute($req1); while ($nb = oci_fetch_array($req1, OCI_ASSOC+OCI_RETURN_NULLS)) { foreach ($nb as $item) { echo $item; } }
Partager