[ Index ]

PHP Cross Reference of Eventum

title

Body

[close]

/include/ -> class.db_api.php (summary)

(no description)

File Size: 156 lines (7 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 2 files
 include/class.error_handler.php
 offline.php

Defines 1 class

DB_API:: (4 methods):
  DB_API()
  get_last_insert_id()
  escapeString()
  getNoWeekendDateDiffSQL()


Class: DB_API  - X-Ref

Class to manage all tasks related to the DB abstraction module. This is only
useful to mantain a data dictionary of the current database schema tables.

DB_API()   X-Ref
Connects to the database and creates a data dictionary array to be used
on database related schema dynamic lookups.


get_last_insert_id()   X-Ref
Method used to get the last inserted ID. This is a simple
wrapper to the mysql_insert_id function, as a work around to
the somewhat annoying implementation of PEAR::DB to create
separate tables to host the ID sequences.

return: integer The last inserted ID

escapeString($str)   X-Ref
Returns the escaped version of the given string.

param: string $str The string that needs to be escaped
return: string The escaped string

getNoWeekendDateDiffSQL($start_date_field, $end_date_field = false)   X-Ref
Returns the SQL used to calculate the difference of 2 dates, not counting weekends.
This thing is truly a work of art, the type of art that throws lemon juice in your eye and then laughs.
If $end_date_field is null, the current date is used instead.

param: string $start_date_field The name of the field the first date is.
param: string $end_date_field The name of the field where the second date is.
return: string The SQL used to compare the 2 dates.



Generated: Wed Dec 19 21:21:33 2007 Cross-referenced by PHPXref 0.7