/var/www/vhosts/disorder.de/script/public_html/tpl/rightblock.tmpl Script.gr - PHP Scripts, HowTos and Tutorials
Requirements
FastSQL is tested to work on
  • Webserver Apache 1.3.x or 2.x
  • PHP 4.0+
  • MySQL 3.2+
  • Linux, MacOSX and FreeBSD
But it should work on Windows as well.
Installation
  1. Unpack the archive
  2. Move the file fastsql.inc to any place that suits you.
  3. include fastsql.inc in your file
  4. Have fun!

Reference
For the impatient,you can move on to the Examples to get a quick start.
However, we recommend you learn at least the basic functions. It is really easy and it is always good to know what you are doing.

Calling FastSQL

Include fastsql.inc in your file :
require_once("PATH_TO/fastsql.inc");
Then create a new instance of the fastsql object:
$conn = new FastSQL;

Methods

query($query,$db='') Performs a query $query on the database $db and returns an array containing the result sets; only the verbose keys are used to save space bigquery($query,$db='') Performs a query $query on the database $db and returns a link to the Mysql result.
This is for queries where large results are expected hugequery($query,$db='') Performs a Select statement and returns the link to the MySQL result.
No Saving, no other queries possible during operation.
(Only for very big queries) single($query,$db='') Performs a query $query on the database $db and returns only the first row, verbose keys singleValue($query, $db = '') Performs a query $query on the database $db and returns only the first value of the first row. update($query,$db='') Does an Update or Delete statement $query on the database $db and returns number of affected rows
insert($query,$db='') Does an Insert statement $query on the database $db and returns the unique ID of the inserted row
fields($table,$db) Returns an array with the fieldnames of the table $table in the database $db
explain($table,$db) Returns a complete EXPLAIN result array for the table $table in the database $db
MkInsert($table,$db,$ins_vals,$skip=array()) This performs an insert statement on table $table in the database $db. The Insert statement is created by using the array $ins_vals. This array must consist of keys corresponding to the field names of $table.
See the examples to make this more transparent. Fields that are in the optional array $skip will not be used. MkUpdate($table,$db,$upd_vals,$upd_comp) This performs an update statement on table $table in the database $db. The Update statement is created by using the array $upd_vals. This array must consist of keys corresponding to the field names of $table.
See the examples to make this more transparent. The update will be done only on data sets where the value of the field $upd_comp has the value of the corresponding value in the $upd_vals array.
(Actually it is much easier than it sounds here. Just see the examples...)

My Sites