Update of /cvsroot/phpvortex/phpvortex/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26032/test
Modified Files:
vortex_test.php
Log Message:
Test program now testing paging and search options of TB_Base::ShowList()
Index: vortex_test.php
===================================================================
RCS file: /cvsroot/phpvortex/phpvortex/test/vortex_test.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** vortex_test.php 4 Oct 2004 16:37:01 -0000 1.3
--- vortex_test.php 4 Oct 2004 18:15:46 -0000 1.4
***************
*** 36,40 ****
--- 36,51 ----
$id3 = $tb->Save(array('ph_id' => '-1', 'ph_name' => 'Test 3', 'ph_phone' => '555-5553')) or print('Error(Save): '.$tb->Error());
echo 'Added ID:'.$id3.'<br>';
+ echo 'List the whole database:<br>';
$tb->ShowList('vortex_test.php?PKEY');
+ echo 'List with a search ("5552"):<br>';
+ $tb->ShowList('vortex_test.php?PKEY',-1,array('ph_phone' => '5552'));
+ echo 'Setting the number of records per page to 2.<br>';
+ $tb->list_recspage = 2;
+ $pgs = $tb->NumPages();
+ echo "Number of pages: $pgs<br>";
+ for ($i=0;$i < $pgs;$i++) {
+ echo "Page $i:<br>";
+ $tb->ShowList('vortex_test.php?PKEY',$i);
+ }
$tb->Seek(array('ph_id' => $id1), FALSE) or print('Error(Seek): '.$tb->Error());
echo 'Seek ID:'.$tb->data['ph_id'];
|