PHP Classes

Packages of henryi

Recommend this page to a friend!
  All class groups  >  All authors  >  Packages of henryi (2)  >  Mission progress status  >  Reputation  
Picture of henryi
Name: henryi <contact>
Classes: 2
Country: Taiwan Taiwan
Age: 47
All time rank: 3362 in Taiwan Taiwan
Week rank: 195 Up2 in Taiwan Taiwan Equal
All time users: 7816
Week users: 0
 
  A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z  
  Files folder image PHP-MYSQL-MSSQL  
The Class for PHP2MYSQL or PHP2MSSQL
This class is an interface to be used with the PHP programming language to help you
connect,disconnect,insert,update,delete,query,result and page_cut from MySQL or MSSQL
more easy.

You just change the setting.inc.php to suit your environment.
($sql_type,$sql_host,$sql_name,$sql_user,$sql_pass,$perpage)
this file is independence so you can setup other variables at this file.

If you already have a configuration file you can change the
var $setting_file = "lib/setting.inc.php";
to
var $setting_file = "your configuration file name";


The latest version of class is 2.0 (update at 2003-05-03 17:00 GMT+8)


This new version change log as follow:
1. Add error handling
2. Modifing the new code format
3. More useful page cut function
4. Add the function about getting the ID generated from the previous INSERT operation

Change Log
2002-07
1. Correct page_cut error.
2. Improve the function nums and function objects these two functions.
3. The new pgae_cut and show_page_cut functions can let you use these
functions with your template

At this version ,this class include follow functions
1. connection --> Function connection()
2. disconnect --> Function disconnect()
3. insert --> Function insert($tb_name,$cols,$val,$astriction)
4. update --> Function update($tb_name,$string,$astriction)
5. delete --> Function del($tb_name,$astriction)
6. query --> Function query($string)
7. num_rows --> Function nums($string="",$qid="")
8. object --> Function objects($string="",$qid="")
9. insert_id --> Function insert_id($qid="");
10. pagecut --> Function page_cut($tb_name,$astriction,$order,$nowpage="0")
11. show_page_cut --> Function show_page_cut($query_string)

Please see the example.php to get more detail about those functions.

  Files folder image PHP-PGSQL  
The Class for PHP2PGSQL
1. connection --> Function connection()
2. query --> Function query($string)
3. num_rows --> Function nums($string="",$qid="")
4. object --> Function objects($string="",$qid="")
5. insert --> Function insert($tb_name,$cols,$val,$astriction)
6. update --> Function update($tb_name,$string,$astriction)
7. delete --> Function del($tb_name,$astriction)

-----------------------------------------------------------------------------------------------------------
Extra Announce
-----------------------------------------------------------------------------------------------------------
You can add this script to PHP-MYSQL-MSSQL class
(you can find it at http://www.phpclasses.org/browse.html/package/657.html)
to make those classes more useful , all you have to do just edit setting.inc.php
add follow lines

============================
elseif($sql_type == "3"){
include_once("pgsql.inc.php");
}
============================


  A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z