 |
|
PTables
This is PERL (v.5.6.0)
package to manage text database with built SQL interface.
This is FREE software. |
|
|
|
About PTables
|
|
|
|
|
It is PERL (v.5.6.0) package to manage text database
with built SQL interface. The database is a folder on server
and table is text file with extension 'tp'. Tables has special
structure to keep metadata and data. The first line is a header with
version, table name and number of columns. The second
and third header line store column's names and data type.
Every table has one pseudo-column tkey. It is an unique identifier
for table rows across whole database. Column delimiter is ~
and row delimeter is ^.
|
|
|
|
#PTH1#PTABLES-V1.50-TEST(3)^
#PTH2#tkey#NAME#LOG_DATE^
#PTH3#number#varchar2#date^
88725329633~alan~2001/3/6~^
88325329681~~~^
55625329683~bob~2003/4/5~^
90725329684~~~^ |
|
|
|
In database folder there is db.conf
file with option to limit size of database so you can prevent
the database grows too big.
|
|
How to use
|
|
|
|
|
|
Include Ptables package in your
script and use very simple interface based on ANSI SQL to connect to
database, to create custom table, to modify table design, to manage
data in table - select, insert, update and delete using where and
orderby clause. If you familiar with Oracle's basic set of DDL and DML
statements it will be easy for you to manage big data files from your
script. What is returned as the resultset of the query?
_SELECT statement returns array of hashes as array
of records _INSERT, UPDATE and DELETE return number of
affected records
|
|
|
|
This is very simplified code with the package
implementation when query returns array of hashes, xml
or simple html table. |
|
|
|
#!/usr/bin/perl
require 'ptables.pl';
#where is your db
$folder_db="home/web/yourfolder/";
$retval=ptables::connect_db($folder_db,"mydb",120);
#what do you want - HASHES
$qry="select * from mytable";
@rs = ptables::exec_sql($query,"mydb");
print "Content-type: text/html\n\n";
#print col names
for $row(@rs){
for $col(keys %$row){print $col;}last;
}
#print data
for $row(@rs){
for $col(keys %$row){print $row->{$col};}
}
#what do you want - XML
$qry="select * from mytable";
$xml =
ptables::exec_sql($query,"mydb","xml");
print "Content-type: text/html\n\n";
#print XML
print $xml
#what do you want - HTML table
- use css to format
$qry="select * from mytable";
$html=
ptables::exec_sql($query,"mydb","html");
print "Content-type: text/html\n\n";
#print HTML table
print $html
SQL statements examples:
|
|
|
|
- select col1,col2 from tablename
where col1='bob' or col2>90 and sex='male' orderby name
desc,tkey;
- select * from tablename;
- select * from tablename
where col1 in (18,19,20,22);
- select * from tablename
where col1 in (select col1 from people where col2 < 400);
- insert into tablename(col1,
col2, col3, col4) values('Cris',32,'Smith',driver);
- insert into
tablename1(col1,col2,col3) select col1,col2,col3 from
tablename2;
- create table tablename(col1
varchar2(25), col2 varchar2(25), col3 varchar2, col4 number,
col5 date);
- update tablename set
col1=55, col2=female where col3='bob' and col4 like 'Calg%';
- drop table tablename
delete tablename where col1='Alan' and col2='128';
- truncate table tablename;
- alter table people drop
cols col1,col2;
- alter table people add cols
col1 varchar2(25), col2 date;
- describe table people;
- list tables
- unlock table tablename (if
error happens this is way to unlock table - remove locking
folder flag from database)
|
|
How works
|
|
|
|
|
|
Ptables administration
web utility is built using Ptables package. This utility has
all tools to manage all databases on server: create
tables, populate, query, delete, modify ...Please click
on image bellow to run the application. |
|
|
|
 |
|
|
|
|
|
|
|
|
|
|
|
|
|
Download free version |
|
|
|
|
Ptables
database engine can be downloaded for free. It is FREEWARE however all
copyright notes have to stay unchanged. There is a short documentation
in 'readme.txt' attached to zipped file available for
download.
|
|
|
PERL (v.5.6.0) is required.
|
|

|
|
PTables
[updated 12-18-2003]
|
|
|
|
NOTE:
It disclaims all warranties- including but not limited to: fitness for a particular purpose, merchantability, loss of business, harm to your system, etc... ALWAYS BACK UP YOUR
SYSTEM BEFORE INSTALLING ANY SCRIPT OR PROGRAM FROM ANY SOURCE!
|
|
PTables Forum |
|
|
|
|
|
Forum
|
|
Additional inquiries |
|
|
|
|
|
|
|
|
|
|
|
More PERL/CGI script |
|
|
|
100% javafree Chat |
|
|
|
|
-
100 %JavaFREE
-
PERL on server side and JScript and DHTML on client side
-
different "mood" messages
-
sound when somebody login/logoff
-
easy setup
-
free (only copyright info required) and no support
-
see on Bajina Basta Portal in action
-
free
-

|
|
Banner rotator |
|
|
|
|
-
SSI rotator
-
rotates banners and URLs on page loading
-
all settings for rotator in
one text file
-
set display frequency for each banner
-
set border for banner and target window for URL link
-
set more than one burp database (different set of
banners)
-
free
-

|
| Guestbook |
|
|
|
|
-
Can autorespond letter to signer
-
Filters out your list of dirty words
-
The newest entry at top of the book
-
Removes all HTML comments to prevent SSI hacks
-
Captures their IP address as a comment in the guestbook
-
You can specify required entry fields
-
Administration utility (page) to remove unwanted gb items
-
free
-

|
| Small ads |
|
|
|
|
-
SSI classifieds application (you must have SSI option)
moderator for new ads or just leave direct writing
give user option to delete their ads anytime
administer ads publishing and deleting
administer ads types
ads search option
templates pages to customize
easy setup
free
|
| Newsboard |
|
|
|
|
|
| Counter |
|
|
|
|
|
|
NOTE |
|
We do not support or
install these free scripts.
|