phpDocumentor Google-XML-Sitemap-Feed
[ class tree: Google-XML-Sitemap-Feed ] [ index: Google-XML-Sitemap-Feed ] [ all elements ]

Class: MySQL_DataBase

Source Location: sitemap.class.php

Class MySQL_DataBase

Class Overview

MySQL_Database Class

The MySQL_Database class provides abstraction so the databaes can be accessed without having to use tep API functions. This class has minimal error handling so make sure your code is tight!

Located in sitemap.class.php [line 32]



		
				Author(s):
		
  • Bobby Easland
Information Tags:
Copyright:  Copyright 2005, Bobby Easland
Link:  osCommerce-Freelancers
Version:  1.1
License:  GNU Public License

Properties

Methods

[ Top ]
Property Summary
string   $db   Database name
string   $host   Database host (localhost, IP based, etc)
resource   $link_id   Database link
string   $pass   Database password
string   $user   Database user

[ Top ]
Method Summary
MySQL_DataBase   MySQL_DataBase()   MySQL_DataBase class constructor
void   ConnectDB()   Function to connect to MySQL
resource   DBPerform()   Function to perform DB inserts and updates - abstracted from osCommerce-MS-2.2 project
array   FetchArray()   Function to fetch array
boolean   Free()   Function to free the resource
mixed   NumRows()   Function to fetch the number of rows
resource   Query()   Function to perform queries
resoource   SelectDB()   Function to select the database
string   Slashes()   Function to add slashes

[ Top ]
Properties
string   $db [line 47]

Database name


[ Top ]
string   $host [line 37]

Database host (localhost, IP based, etc)


[ Top ]
resource   $link_id [line 57]

Database link


[ Top ]
string   $pass [line 52]

Database password


[ Top ]
string   $user [line 42]

Database user


[ Top ]
Methods
Constructor MySQL_DataBase  [line 68]

  MySQL_DataBase MySQL_DataBase( string $host, string $user, string $db, string $pass  )

MySQL_DataBase class constructor

Parameters:
string   $host: 
string   $user: 
string   $db: 
string   $pass: 

Information Tags:
Version:  1.0
Author:  Bobby Easland

[ Top ]
ConnectDB  [line 82]

  void ConnectDB( )

Function to connect to MySQL


Information Tags:
Version:  1.0
Author:  Bobby Easland

[ Top ]
DBPerform  [line 162]

  resource DBPerform( string $table, array $data, [string $action = 'insert'], [string $parameters = '']  )

Function to perform DB inserts and updates - abstracted from osCommerce-MS-2.2 project

Parameters:
string   $table:  Database table
array   $data:  Associative array of columns / values
string   $action:  insert or update
string   $parameters: 

Information Tags:
Version:  1.0
Author:  Bobby Easland

[ Top ]
FetchArray  [line 115]

  array FetchArray( resource $resource_id, [string $type = MYSQL_BOTH]  )

Function to fetch array

Parameters:
resource   $resource_id: 
string   $type:  MYSQL_BOTH or MYSQL_ASSOC

Information Tags:
Version:  1.0
Author:  Bobby Easland

[ Top ]
Free  [line 137]

  boolean Free( resource $resource_id  )

Function to free the resource

Parameters:
resource   $resource_id: 

Information Tags:
Version:  1.0
Author:  Bobby Easland

[ Top ]
NumRows  [line 126]

  mixed NumRows( resource $resource_id  )

Function to fetch the number of rows

Parameters:
resource   $resource_id: 

Information Tags:
Version:  1.0
Author:  Bobby Easland

[ Top ]
Query  [line 103]

  resource Query( string $query  )

Function to perform queries

Parameters:
string   $query:  SQL statement

Information Tags:
Version:  1.0
Author:  Bobby Easland

[ Top ]
SelectDB  [line 92]

  resoource SelectDB( )

Function to select the database


Information Tags:
Version:  1.0
Author:  Bobby Easland

[ Top ]
Slashes  [line 148]

  string Slashes( string $data  )

Function to add slashes

Parameters:
string   $data: 

Information Tags:
Version:  1.0
Author:  Bobby Easland

[ Top ]

Documentation generated on Sat, 4 Jun 2005 23:45:59 -0400 by phpDocumentor 1.3.0RC3