$rid = ifx_prepare ("select * from emp where name like ". $name, $connid, IFX_SCROLL); if (! $rid) {... error...} $rowcount = ifx_affected_rows($rid); if ($rowcount 1000) {printf ("Too many rows in result set (%d)\n br", $rowcount); die ("Please restrict your query br \n");} if (! ifx_do ($rid)) {... error...} $row = ifx_fetch_row ($rid, "NEXT"); while (is_array($row)) {for(reset($row); $fieldname=key($row); next($row)) {$fieldvalue = $row[$fieldname]; printf ("%s = %s ,", $fieldname, $fieldvalue);} printf("\n br "); $row = ifx_fetch_row ($rid, "NEXT");} ifx_free_result ($rid);
?php $rid = ifx_prepare ("select * from emp where name like ". $name, $connid, IFX_SCROLL); if (! $rid) {/ /... erreur...} $rowcount = ifx_affected_rows($rid); if ($rowcount 1000) {printf ("Trop de lignes dans le résultats. (%d)\n br", $rowcount); die ("Recommencez votre requête. br \n");} if (! ifx_do ($rid)) {/ /... erreur...} $row = ifx_fetch_row ($rid, "NEXT"); while (is_array($row)) {for(reset($row); $fieldname=key($row); next($row)) {$fieldvalue = $row[$fieldname]; printf ("%s = %s ,", $fieldname, $fieldvalue);} printf("\n br "); $row = ifx_fetch_row ($rid, "NEXT");} ifx_free_result ($rid);?