Login   Register  
PHP Classes
elePHPant
Icontem

File: README.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of  >  mysqlc1  >  README.txt  >  Download  
File: README.txt
Role: Documentation
Content type: text/plain
Description: The Readme File. Installation Instructions can be found inside.
Class: mysqlc1
connect to a mysql database
Author: By
Last change:
Date: 2006-01-29 11:54
Size: 1,132 bytes
 

Contents

Class file image Download
SMyCC [Pronounced "smEEk"]
Simple MySQL Connection Class)
© 2005-2006 Steve Castle
http://www.stscac.com

Installation
------------
1. Unpack
2. Edit database.inc.php with your server specifications
3. Move to web folder
4. Include in all necessary files you want to connect to MySQL from
5. Make the calls (see below)

How to make the calls
---------------------
To run the MySQL Connection, you will have to call a new instance of the class
and tell it what function to run (where you want the connection to be made):

       $mysql = new mysql(); // This is the calling of class instance
       $mysql->connect(); // This is the calling of the class function

To Run a query on the database:

       // The Query here is a sample for this instance
       $mysql->query("SELECT * FROM table WHERE something='something_else'");
        
To Close the MySQL Connection (and free MySQL/Server memory):

       /*You Must have run the $mysql->query to be able to use the
       $mysql->end function
       */
       $mysql->end();
       
That's it!

Questions can be sent to me at steve@stscac.com