Login   Register  
PHP Classes
elePHPant
Icontem

File: documentation

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of ashwin suresh morey  >  Connect  >  documentation  >  Download  
File: documentation
Role: Documentation
Content type: text/plain
Description: document file explaining the class
Class: Connect
MySQL database access wrapper
Author: By
Last change:
Date: 2005-10-27 03:08
Size: 902 bytes
 

Contents

Class file image Download
Class Name:database
Description:database abstraction class to connect to the mysql database and to simplify sql queries.
Constructor: 
Database($hostname,$username,$password,$dbName);
This constructor sets the values of these variables

Methods:
Connect()
Opens a connection to the database, selects a database and returns a connection ID.

Query($sql)
This function executes sql query. It takes sql query as its parameter and returns a resource ID

Num_rows()
This function returns no of rows returned by the sql query

Movenext()
This method returns an object with properties of the fetched row
Getfield()
This function returns value of the field corresponding to that record

Pre-requisite for using the class:
Php and mysql should be installed
Url of the class:
http://kiran/dbClass/example.php

for usage of the class, please refer to source code of example.php file.