Class OCSP_CURSOR_mySQL

Description

handels mySQL database cursor

  • author: Peter Krebs (pk) <pitlinz@users.sourceforge.net>
  • version: pk-07-06-15 renamed from mySQL_CURSOR to OCSP_CURSOR_mySQL
  • version: pk-06-07-26 parent object DB_CURSOR added
  • todo: currently most function only work with select rights for public to any table if different db users are used table rights has to be set manualy
  • project: Open CSP-Management
  • license: GNU Public License

Located in /db/OCSP_CURSOR_mySQL.phpclass (line 35)

OCSP_CURSOR
   |
   --OCSP_CURSOR_mySQL
Variable Summary
 bool $buffered
 mysqlconection $myConnId
 mysqlcursor $myCursor
Method Summary
 bool OCSP_CURSOR_mySQL (mysqlconection $aConnId, string $aQuery, [bool $autoClose = TRUE], [bool $useBuffer = TRUE], [debug $debug = FALSE])
 void fetchArray ()
 array fetchArrayFld ([boolean $ucase = FALSE], boolean $debug)
 mixed fetchArrayNum ([int $pos = -1], [boolean $debug = FALSE])
 void free ()
 void numOfRows ()
Variables
bool $buffered = TRUE (line 47)
  • var: use mysql_query instead of mysql_unbuffered_query
mysqlconection $myConnId = FALSE (line 43)
mysqlcursor $myCursor = FALSE (line 39)

Inherited Variables

Inherited from OCSP_CURSOR

OCSP_CURSOR::$myAutoClose
OCSP_CURSOR::$myQuery
OCSP_CURSOR::$rowNr
Methods
Constructor OCSP_CURSOR_mySQL (line 61)

calls mysql_query or mysql_unbufferd_query to get a resultset

  • return: if we get a valid mySQL cursor
bool OCSP_CURSOR_mySQL (mysqlconection $aConnId, string $aQuery, [bool $autoClose = TRUE], [bool $useBuffer = TRUE], [debug $debug = FALSE])
  • mysqlconection $aConnId
  • string $aQuery
  • bool $autoClose: close cursor ofter the last row fetch
  • bool $useBuffer: use mysql_query ?
  • debug $debug: since pk-05-01-12
fetchArray (line 199)
void fetchArray ()
fetchArrayFld (line 151)

returns an array of a database row

  • global: $OCSP_CONF 0:
  • version: pk-07-08-28
array fetchArrayFld ([boolean $ucase = FALSE], boolean $debug)
  • boolean $ucase: make column names uppercase
  • boolean $debug
fetchArrayNum (line 94)
  • return: (array) on success boolean on failure
mixed fetchArrayNum ([int $pos = -1], [boolean $debug = FALSE])
  • int $pos
  • boolean $debug
free (line 239)

free the cursor with @mysql_free_result

void free ()
numOfRows (line 247)
void numOfRows ()

Documentation generated on Thu, 08 Jan 2009 17:45:22 +0100 by phpDocumentor 1.4.0a2