Home
Download
Documentation
Forum
|
phpDatabase.net
Submitted by admin on Wed, 2006-01-18 10:45.phpDatabase.net is an open source pure php database script. It implements basic database functions, like :
- creating and dropping database
- creating, changing and dropping tables and sequences
- selecting, inserting, updating and deleting data from tables
- automatic locking of files, so simultanous changing the data is possible.
- transaction processing, commiting or rolling back of made changes
- default auto commiting mode
For all of this you only need to download one php Script , include it and start to use its functions in your own php Application. Of course this will never be so performant and universal as fore example MySql but very often it is just enough. First application where we used it was phpAlbum.net.
|
|
Example use of phpDatabase.net
Submitted by admin on Sat, 2006-02-04 13:14.This is the first example of using phpDatabase.net. Here we will show how to use basic functions of phpAlbum.net.
Some times it is good to test first if the database is already created or the script is first time started so, the database should be created. This could look like following:
<?php
if( !db_startup_database("db_one","data/") ){
// the database could not be started so it was not created yet
// for creating database use the same parameters as for opening it
// data/ directory should have be writable for script user (chmod 777)
if(!db_create_database("db_one","data/")) die(db_get_last_error_text());
// if databse is created, we call our function to create all custom tables and sequeces
my_install_structure();
}
?>
Documentation - phpDatabase
Submitted by admin on Wed, 2006-01-25 13:39.
1. General
phpDatabase is a PHP database library, implementing database features without using any third party database system. You have only to include it in your code as following:
require("phpdatabase.php");
and you can start using its functions.
This library has four main categories of functions:
- Database functions - used for creating and dropping database
- Error handling functions - used to request the error status of db,i.e. last error message
- DDL functions - data definition language, used for creating and manipulating database objects like tables

Home
Download
Documentation
Forum