[PHP-DEV] CVS update: php3/test/interbase From: andrew (php-dev <email protected>)
Date: 03/20/99

Date: Saturday March 20, 1999 @ 10:03
Author: andrew

Update of /repository/php3/test/interbase
In directory asf:/u/temp/cvs-serv19249/test/interbase

Modified Files:
        001.php3t 002.php3t 003.php3t 004.php3t 005.php3t 006.php3t
        interbase.inc
Log Message:
Added charset parameter to ibase_connect, ibase_pconnect

Initial arrays support added. Now read-only, not tested on
        multidimensional arrays.
        
Constant argument ibase_fetch() "TEXT" changed to constant IBASE_TEXT,
        added IBASE_TIMESTAMP for fetching DATE as timestamp.
        
Constant arguments ibase_trans() changed:

       "READ" IBASE_READ
       "COMMITED" IBASE_COMMITED
       "CONSISTENCY" IBASE_CONSISTENCY
       "NOWAIT" IBASE_NOWAIT
Index: php3/test/interbase/001.php3t
diff -c php3/test/interbase/001.php3t:1.1 php3/test/interbase/001.php3t:1.2
*** php3/test/interbase/001.php3t:1.1 Tue Mar 2 08:30:20 1999
--- php3/test/interbase/001.php3t Sat Mar 20 10:03:33 1999
***************
*** 4,9 ****
--- 4,11 ----
  --GET--
  --FILE--
  <?
+ /* $Id: 001.php3t,v 1.2 1999/03/20 15:03:33 andrew Exp $ */
+
          $test_base = "ibase_test.tmp";
          $name = tempnam("","CREATEDB");
          $ftmp = fopen($name,"w");
Index: php3/test/interbase/002.php3t
diff -c php3/test/interbase/002.php3t:1.1 php3/test/interbase/002.php3t:1.2
*** php3/test/interbase/002.php3t:1.1 Tue Mar 2 08:30:20 1999
--- php3/test/interbase/002.php3t Sat Mar 20 10:03:33 1999
***************
*** 4,9 ****
--- 4,11 ----
  --GET--
  --FILE--
  <?
+ /* $Id: 002.php3t,v 1.2 1999/03/20 15:03:33 andrew Exp $ */
+
      require("interbase/interbase.inc");
      
          $test_base = "ibase_test.tmp";
Index: php3/test/interbase/003.php3t
diff -c php3/test/interbase/003.php3t:1.1 php3/test/interbase/003.php3t:1.2
*** php3/test/interbase/003.php3t:1.1 Tue Mar 2 08:30:20 1999
--- php3/test/interbase/003.php3t Sat Mar 20 10:03:33 1999
***************
*** 4,9 ****
--- 4,11 ----
  --GET--
  --FILE--
  <?
+ /* $Id: 003.php3t,v 1.2 1999/03/20 15:03:33 andrew Exp $ */
+
      require("interbase/interbase.inc");
      
          $test_base = "ibase_test.tmp";
Index: php3/test/interbase/004.php3t
diff -c php3/test/interbase/004.php3t:1.1 php3/test/interbase/004.php3t:1.2
*** php3/test/interbase/004.php3t:1.1 Tue Mar 2 08:30:20 1999
--- php3/test/interbase/004.php3t Sat Mar 20 10:03:33 1999
***************
*** 4,9 ****
--- 4,11 ----
  --GET--
  --FILE--
  <?
+ /* $Id: 004.php3t,v 1.2 1999/03/20 15:03:33 andrew Exp $ */
+
      require("interbase/interbase.inc");
      
          $test_base = "ibase_test.tmp";
***************
*** 108,114 ****
      
      echo "fetch blob 3\n";
      $q = ibase_query("select v_blob from test4 where v_integer = 3");
! $row = ibase_fetch_object($q,"TEXT");
      echo $row->V_BLOB;
      ibase_free_result($q);
  
--- 110,116 ----
      
      echo "fetch blob 3\n";
      $q = ibase_query("select v_blob from test4 where v_integer = 3");
! $row = ibase_fetch_object($q,IBASE_TEXT);
      echo $row->V_BLOB;
      ibase_free_result($q);
  
Index: php3/test/interbase/005.php3t
diff -c php3/test/interbase/005.php3t:1.1 php3/test/interbase/005.php3t:1.2
*** php3/test/interbase/005.php3t:1.1 Tue Mar 2 08:30:21 1999
--- php3/test/interbase/005.php3t Sat Mar 20 10:03:34 1999
***************
*** 4,16 ****
  --GET--
  --FILE--
  <?
      require("interbase/interbase.inc");
      
      $test_base = "ibase_test.tmp";
      
      ibase_connect($test_base);
  
! ibase_query("create table test5 (i integer)");
      ibase_close();
  
  
--- 4,19 ----
  --GET--
  --FILE--
  <?
+ /* $Id: 005.php3t,v 1.2 1999/03/20 15:03:34 andrew Exp $ */
+
      require("interbase/interbase.inc");
      
      $test_base = "ibase_test.tmp";
      
      ibase_connect($test_base);
  
!  <email protected>("create table test5 (i integer)");
!  <email protected>("delete from test5");
      ibase_close();
  
  
***************
*** 69,75 ****
      
      $link_def = ibase_connect($test_base);
      
! $tr_def_l1 = ibase_trans("READ"); /* here transaction start */
      
      /* all default */
          $res = ibase_query("select * from test5");
--- 72,78 ----
      
      $link_def = ibase_connect($test_base);
      
! $tr_def_l1 = ibase_trans(IBASE_READ); /* here transaction start */
      
      /* all default */
          $res = ibase_query("select * from test5");
***************
*** 105,112 ****
      ibase_connect($test_base);
      
          $tr_1 = ibase_trans(); /* this default transaction also */
! $tr_2 = ibase_trans("READ");
! $tr_3 = ibase_trans("READ COMMITED");
      
          $res = ibase_query("select * from test5");
      
--- 108,115 ----
      ibase_connect($test_base);
      
          $tr_1 = ibase_trans(); /* this default transaction also */
! $tr_2 = ibase_trans(IBASE_READ);
! $tr_3 = ibase_trans(IBASE_READ+IBASE_COMMITED);
      
          $res = ibase_query("select * from test5");
      
***************
*** 159,166 ****
      $link_1 = ibase_pconnect($test_base);
      $link_2 = ibase_pconnect($test_base);
      
! $tr_1 = ibase_trans($link_2); /* this default transaction also */
! $tr_2 = ibase_trans($link_2, "COMMITED");
      
          $res = ibase_query($tr_1, "select * from test5");
      
--- 162,169 ----
      $link_1 = ibase_pconnect($test_base);
      $link_2 = ibase_pconnect($test_base);
      
! $tr_1 = ibase_trans($link_2, IBASE_DEFAULT); /* this default transaction also */
! $tr_2 = ibase_trans($link_2, IBASE_COMMITED);
      
          $res = ibase_query($tr_1, "select * from test5");
      
Index: php3/test/interbase/006.php3t
diff -c php3/test/interbase/006.php3t:1.1 php3/test/interbase/006.php3t:1.2
*** php3/test/interbase/006.php3t:1.1 Tue Mar 2 08:30:21 1999
--- php3/test/interbase/006.php3t Sat Mar 20 10:03:34 1999
***************
*** 4,9 ****
--- 4,11 ----
  --GET--
  --FILE--
  <?
+ /* $Id: 006.php3t,v 1.2 1999/03/20 15:03:34 andrew Exp $ */
+
      require("interbase/interbase.inc");
      
      $test_base = "ibase_test.tmp";
Index: php3/test/interbase/interbase.inc
diff -c php3/test/interbase/interbase.inc:1.1 php3/test/interbase/interbase.inc:1.2
*** php3/test/interbase/interbase.inc:1.1 Tue Mar 2 08:30:21 1999
--- php3/test/interbase/interbase.inc Sat Mar 20 10:03:34 1999
***************
*** 1,4 ****
--- 1,5 ----
  <?
+ /* $Id: interbase.inc,v 1.2 1999/03/20 15:03:34 andrew Exp $ */
  /* used in tests */
  
  srand((double)microtime()*1000000);
***************
*** 33,39 ****
  function rand_datetime()
  {
      return sprintf("%02d/%02d/%4d %02d:%02d:%02d",
! rand()%12+1, rand()%28+1, rand()%400+1670,
      rand()%24, rand()%60, rand()%60);
  }
  
--- 34,40 ----
  function rand_datetime()
  {
      return sprintf("%02d/%02d/%4d %02d:%02d:%02d",
! rand()%12+1, rand()%28+1, rand()%100+1910,
      rand()%24, rand()%60, rand()%60);
  }
  

--
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>