Date: 10/31/98
- Next message: Bug Database: "[PHP-DEV] Bug #867 Updated: No inputfile specified"
- Previous message: danny: "[PHP-DEV] CVS update: php3/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Saturday October 31, 1998 @ 14:10
Author: danny
Update of /repository/php3/tests
In directory asf:/u2/tmp/cvs-serv15976/tests
Modified Files:
informix.php3
Log Message:
Since ifx_num_rows is documented, it might as well work instead of
always returning -1.
It returns the number of rows fetched so far for a particular query.
Index: php3/tests/informix.php3
diff -c php3/tests/informix.php3:1.5 php3/tests/informix.php3:1.6
*** php3/tests/informix.php3:1.5 Tue Sep 29 16:12:24 1998
--- php3/tests/informix.php3 Sat Oct 31 14:10:34 1998
***************
*** 80,85 ****
--- 80,88 ----
printf("\n");
$row = ifx_fetch_row($resultid, "next");
}
+
+ printf("Number of rows fetched so far : %d\n", ifx_num_rows($resultid));
+
printf("+----------------------------------------+\n");
printf("| and now in reverse order : |\n");
printf("+----------------------------------------+\n");
***************
*** 93,98 ****
--- 96,103 ----
$row = ifx_fetch_row($resultid, "previous");
}
+ printf("Number of rows fetched so far : %d\n", ifx_num_rows($resultid));
+
printf("+-----------------------------------------+\n");
printf("| and now row number 10 |\n");
printf("+-----------------------------------------+\n");
***************
*** 205,210 ****
--- 210,216 ----
printf("+-----------------------------------------+\n");
printf("| some execute immediates(prepared) |\n");
printf("+-----------------------------------------+\n");
+
$query = "create table testdh (k serial, d char(100), primary key (k))";
$resultid = ifx_prepare($query, $res);
if (!check_ifx($resultid)) {
***************
*** 224,230 ****
ifx_free_result($resultid);
printf("\n");
printf("+-----------------------------------------+\n");
! printf("| some inserts unprepared) |\n");
printf("+-----------------------------------------+\n");
for ($i = 1; $i < 20; $i++) {
--- 230,236 ----
ifx_free_result($resultid);
printf("\n");
printf("+-----------------------------------------+\n");
! printf("| some inserts (unprepared) |\n");
printf("+-----------------------------------------+\n");
for ($i = 1; $i < 20; $i++) {
***************
*** 239,244 ****
--- 245,270 ----
}
ifx_free_result($rc);
}
+
+ printf("\n");
+ printf("+-----------------------------------------+\n");
+ printf("| some updates (unprepared) |\n");
+ printf("+-----------------------------------------+\n");
+
+ for ($i = 1; $i < 20; $i++) {
+ $query = sprintf(
+ "update testdh set d = \"- this is still row " .
+ "number %d -\" where k = %d",
+ $i, $i);
+ echo $query . "\n";
+ $rc = ifx_query($query, $res);
+ if (! $rc) {
+ printf("update fails : %s:%s\n", ifx_error($res), ifx_errormsg());
+ die;
+ }
+ ifx_free_result($rc);
+ }
+
printf("\n");
printf("+-----------------------------------------+\n");
-- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe <email protected> For help: php-dev-help <email protected>
- Next message: Bug Database: "[PHP-DEV] Bug #867 Updated: No inputfile specified"
- Previous message: danny: "[PHP-DEV] CVS update: php3/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

