deprecated
Table of Contents
Functions
- db_connect() : true
- Connect to the database server and select the database.
- query() : results
- The main query function. Runs the SQL on the connection and handles errors.
- query_single_row() : results
- Runs a SQL query and returns an associative array of the first row.
- query_full_array() : results
- Runs a SQL query and returns an array of associative arrays of every row returned.
- db_quote() : string
- mysqli_real_escape_string standin that insures the DB connection is passed.
- db_insert_id() : mixed
- returns the insert id of the last database insert
- db_fetch_assoc() : mixed
- Fetch a result row as an associative array
- db_error() : mixed
- Returns the text of the error message from previous operation
- db_affected_rows() : mixed
- Get number of affected rows in previous operation
- db_fetch_row() : mixed
- Get a result row as an enumerated array
- db_num_rows() : mixed
- Get number of rows in result
- db_close() : mixed
- Closes the database
- db_software() : mixed
- report the software of the database
- db_create() : mixed
- create the database
- db_permissions() : mixed
- Returns user's permissions on the database
- db_setSQLmode() : mixed
- Sets the SQL session mode to empty
- db_getSQLmode() : mixed
- Queries the SQL session mode
- db_collation() : mixed
- db_create_table() : mixed
- db_table_update() : mixed
- db_show() : mixed
- db_list_fields() : mixed
- db_truncate_table() : mixed
- db_LIKE_escape() : mixed
- db_free_result() : mixed
- prefix() : prefixed
- Prefix a table name with a user-defined string to avoid conflicts.
- getWhereClause() : contructed
- Constructs a WHERE clause ("WHERE uniqueid1='uniquevalue1' AND uniqueid2='uniquevalue2' ...") from an array (map) of variables and their values which identifies a unique record in the database table.
- getSetClause() : contructed
- Constructs a SET clause ("SET uniqueid1='uniquevalue1', uniqueid2='uniquevalue2' ...") from an array (map) of variables and their values which identifies a unique record in the database table. Used to 'move' records. Note: does not check anything.
- db_name() : mixed
- returns the connected database name
- db_count() : int
- Counts entries in a db table
- db_getServerInfo() : string
- Returns the server info
- db_getClientInfo() : string
- Returns the client info
- db_getVersion() : int
- Gets the plain version number
- zp_imageGet() : mixed
- zp_imageOutput() : mixed
- zp_createImage() : mixed
- zp_imageFill() : mixed
- zp_imageColorTransparent() : mixed
- zp_copyCanvas() : mixed
- zp_resampleImage() : mixed
- zp_imageUnsharpMask() : mixed
- zp_imageResizeAlpha() : mixed
- zp_imageCanRotate() : mixed
- zp_rotateImage() : mixed
- zp_imageDims() : mixed
- zp_imageIPTC() : mixed
- zp_imageWidth() : mixed
- zp_imageHeight() : mixed
- zp_imageMerge() : mixed
- zp_imageGray() : mixed
- zp_imageKill() : mixed
- zp_colorAllocate() : mixed
- zp_writeString() : mixed
- zp_drawRectangle() : mixed
- zp_graphicsLibInfo() : mixed
- zp_getFonts() : mixed
- zp_imageLoadFont() : mixed
- zp_imageFontWidth() : mixed
- zp_imageFontHeight() : mixed
- imageBlurGD() : mixed
- zp_imageFromString() : mixed
Functions
db_connect()
Connect to the database server and select the database.
Use the global object $_zp_db and the class method connect() instead.
db_connect(array<string|int, mixed> $config[, bool $errorstop = true ]) : true
Parameters
- $config : array<string|int, mixed>
-
the db configuration parameters
- $errorstop : bool = true
-
set to false to omit error messages
Tags
Return values
true —if successful connection
query()
The main query function. Runs the SQL on the connection and handles errors.
Use the global object $_zp_db and the class method of the same name instead.
query(string $sql[, bool $errorstop = true ]) : results
Parameters
- $sql : string
-
sql code
- $errorstop : bool = true
-
set to false to supress the error message
Tags
Return values
results —of the sql statements
query_single_row()
Runs a SQL query and returns an associative array of the first row.
Use the global object $_zp_db and the class method querySingleRow() instead.
query_single_row(string $sql[, bool $errorstop = true ]) : results
Doesn't handle multiple rows, so this should only be used for unique entries.
Parameters
- $sql : string
-
sql code
- $errorstop : bool = true
-
set to false to supress the error message
Tags
Return values
results —of the sql statements
query_full_array()
Runs a SQL query and returns an array of associative arrays of every row returned.
Use the global object $_zp_db and the class method queryFullArray() instead.
query_full_array(string $sql[, bool $errorstop = true ][, string $key = NULL ]) : results
Parameters
- $sql : string
-
sql code
- $errorstop : bool = true
-
set to false to supress the error message
- $key : string = NULL
-
optional array index key
Tags
Return values
results —of the sql statements
db_quote()
mysqli_real_escape_string standin that insures the DB connection is passed.
Use the global object $_zp_db and the class method quote() instead.
db_quote(string $string[, mixed $addquotes = true ]) : string
Parameters
- $string : string
- $addquotes : mixed = true
Tags
Return values
stringdb_insert_id()
returns the insert id of the last database insert
Use the global object $_zp_db and the class method insertID() instead.
db_insert_id() : mixed
Tags
db_fetch_assoc()
Fetch a result row as an associative array
Use the global object $_zp_db and the class method fetchAssoc() instead.
db_fetch_assoc(mixed $resource) : mixed
Parameters
- $resource : mixed
Tags
db_error()
Returns the text of the error message from previous operation
Use the global object $_zp_db and the class method getError() instead.
db_error() : mixed
Tags
db_affected_rows()
Get number of affected rows in previous operation
Use the global object $_zp_db and the class method getAffectedRows() instead.
db_affected_rows() : mixed
Tags
db_fetch_row()
Get a result row as an enumerated array
Use the global object $_zp_db and the class method fetchRow() instead.
db_fetch_row(mixed $result) : mixed
Parameters
- $result : mixed
Tags
db_num_rows()
Get number of rows in result
Use the global object $_zp_db and the class method getNumRows() instead.
db_num_rows(mixed $result) : mixed
Parameters
- $result : mixed
Tags
db_close()
Closes the database
Use the global object $_zp_db and the class method close() instead.
db_close() : mixed
Tags
db_software()
report the software of the database
Use the global object $_zp_db and the class method getSoftware() instead.
db_software() : mixed
Tags
db_create()
create the database
Use the global object $_zp_db and the class method create() instead
db_create() : mixed
Tags
db_permissions()
Returns user's permissions on the database
Use the global object $_zp_db and the class method getPermissions() instead.
db_permissions() : mixed
Tags
db_setSQLmode()
Sets the SQL session mode to empty
Use the global object $_zp_db and the class method setSQLmode() instead.
db_setSQLmode() : mixed
Tags
db_getSQLmode()
Queries the SQL session mode
Use the global object $_zp_db and the class method getSQLmode() instead.
db_getSQLmode() : mixed
Tags
db_collation()
Use the global object $_zp_db and the class method getCollation() instead.
db_collation() : mixed
Tags
db_create_table()
Use the global object $_zp_db and the class method createTable() instead.
db_create_table(mixed $sql) : mixed
Parameters
- $sql : mixed
Tags
db_table_update()
Use the global object $_zp_db and the class method tableUpdate() instead.
db_table_update(mixed $sql) : mixed
Parameters
- $sql : mixed
Tags
db_show()
Use the global object $_zp_db and the class method show() instead.
db_show(mixed $what[, mixed $aux = '' ]) : mixed
Parameters
- $what : mixed
- $aux : mixed = ''
Tags
db_list_fields()
Use the global object $_zp_db and the class method listFields() instead.
db_list_fields(mixed $table) : mixed
Parameters
- $table : mixed
Tags
db_truncate_table()
Use the global object $_zp_db and the class method truncateTable() instead.
db_truncate_table(mixed $table) : mixed
Parameters
- $table : mixed
Tags
db_LIKE_escape()
Use the global object $_zp_db and the class method likeEscape() instead.
db_LIKE_escape(mixed $str) : mixed
Parameters
- $str : mixed
Tags
db_free_result()
Use the global object $_zp_db and the class method freeResult() instead.
db_free_result(mixed $result) : mixed
Parameters
- $result : mixed
Tags
prefix()
Prefix a table name with a user-defined string to avoid conflicts.
Use the global object $_zp_db and the class method of the same name instead.
prefix([string $tablename = NULL ]) : prefixed
This MUST be used in all database queries.
Parameters
- $tablename : string = NULL
-
name of the table
Tags
Return values
prefixed —table name
getWhereClause()
Constructs a WHERE clause ("WHERE uniqueid1='uniquevalue1' AND uniqueid2='uniquevalue2' ...") from an array (map) of variables and their values which identifies a unique record in the database table.
Use the global object $_zp_db and the class method of the same name instead
getWhereClause(string $unique_set) : contructed
Parameters
- $unique_set : string
-
what to add to the WHERE clause
Tags
Return values
contructed —WHERE cleause
getSetClause()
Constructs a SET clause ("SET uniqueid1='uniquevalue1', uniqueid2='uniquevalue2' ...") from an array (map) of variables and their values which identifies a unique record in the database table. Used to 'move' records. Note: does not check anything.
Use the global object $_zp_db and the class method of the same name instead
getSetClause(string $new_unique_set) : contructed
Parameters
- $new_unique_set : string
-
what to add to the SET clause
Tags
Return values
contructed —SET cleause
db_name()
returns the connected database name
Use the global object $_zp_db and the class method getDBName() instead.
db_name() : mixed
Tags
db_count()
Counts entries in a db table
Use the global object $_zp_db and the class method count() instead.
db_count(string $table[, string $clause = NULL ][, string $field = "id" ]) : int
Parameters
- $table : string
-
Table name
- $clause : string = NULL
-
Where clause for the count query
- $field : string = "id"
-
Which fields to count (default: id)
Tags
Return values
intdb_getServerInfo()
Returns the server info
Use the global object $_zp_db and the class method getServerInfo() instead.
db_getServerInfo() : string
Tags
Return values
stringdb_getClientInfo()
Returns the client info
Use the global object $_zp_db and the class method getClientInfo() instead.
db_getClientInfo() : string
Tags
Return values
stringdb_getVersion()
Gets the plain version number
db_getVersion() : int
Tags
Return values
intzp_imageGet()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageGet(mixed $imgfile) : mixed
Parameters
- $imgfile : mixed
Tags
zp_imageOutput()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageOutput(mixed $im, mixed $type[, mixed $filename = NULL ][, mixed $qual = 75 ]) : mixed
Parameters
- $im : mixed
- $type : mixed
- $filename : mixed = NULL
- $qual : mixed = 75
Tags
zp_createImage()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_createImage(mixed $w, mixed $h) : mixed
Parameters
- $w : mixed
- $h : mixed
Tags
zp_imageFill()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageFill(mixed $image, mixed $x, mixed $y, mixed $color) : mixed
Parameters
- $image : mixed
- $x : mixed
- $y : mixed
- $color : mixed
Tags
zp_imageColorTransparent()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageColorTransparent(mixed $image, mixed $color) : mixed
Parameters
- $image : mixed
- $color : mixed
Tags
zp_copyCanvas()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_copyCanvas(mixed $imgCanvas, mixed $img, mixed $dest_x, mixed $dest_y, mixed $src_x, mixed $src_y, mixed $w, mixed $h) : mixed
Parameters
- $imgCanvas : mixed
- $img : mixed
- $dest_x : mixed
- $dest_y : mixed
- $src_x : mixed
- $src_y : mixed
- $w : mixed
- $h : mixed
Tags
zp_resampleImage()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_resampleImage(mixed $dst_image, mixed $src_image, mixed $dst_x, mixed $dst_y, mixed $src_x, mixed $src_y, mixed $dst_w, mixed $dst_h, mixed $src_w, mixed $src_h) : mixed
Parameters
- $dst_image : mixed
- $src_image : mixed
- $dst_x : mixed
- $dst_y : mixed
- $src_x : mixed
- $src_y : mixed
- $dst_w : mixed
- $dst_h : mixed
- $src_w : mixed
- $src_h : mixed
Tags
zp_imageUnsharpMask()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageUnsharpMask(mixed $img, mixed $amount, mixed $radius, mixed $threshold) : mixed
Parameters
- $img : mixed
- $amount : mixed
- $radius : mixed
- $threshold : mixed
Tags
zp_imageResizeAlpha()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageResizeAlpha(mixed &$src, mixed $w, mixed $h) : mixed
Parameters
- $src : mixed
- $w : mixed
- $h : mixed
Tags
zp_imageCanRotate()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageCanRotate() : mixed
Tags
zp_rotateImage()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_rotateImage(mixed $im, mixed $rotate) : mixed
Parameters
- $im : mixed
- $rotate : mixed
Tags
zp_imageDims()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageDims(mixed $filename) : mixed
Parameters
- $filename : mixed
Tags
zp_imageIPTC()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageIPTC(mixed $filename) : mixed
Parameters
- $filename : mixed
Tags
zp_imageWidth()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageWidth(mixed $im) : mixed
Parameters
- $im : mixed
Tags
zp_imageHeight()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead
zp_imageHeight(mixed $im) : mixed
Parameters
- $im : mixed
Tags
zp_imageMerge()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageMerge(mixed $dst_im, mixed $src_im, mixed $dst_x, mixed $dst_y, mixed $src_x, mixed $src_y, mixed $src_w, mixed $src_h, mixed $pct) : mixed
Parameters
- $dst_im : mixed
- $src_im : mixed
- $dst_x : mixed
- $dst_y : mixed
- $src_x : mixed
- $src_y : mixed
- $src_w : mixed
- $src_h : mixed
- $pct : mixed
Tags
zp_imageGray()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageGray(mixed $image) : mixed
Parameters
- $image : mixed
Tags
zp_imageKill()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageKill(mixed $im) : mixed
Parameters
- $im : mixed
Tags
zp_colorAllocate()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_colorAllocate(mixed $image, mixed $red, mixed $green, mixed $blue) : mixed
Parameters
- $image : mixed
- $red : mixed
- $green : mixed
- $blue : mixed
Tags
zp_writeString()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_writeString(mixed $image, mixed $font, mixed $x, mixed $y, mixed $string, mixed $color) : mixed
Parameters
- $image : mixed
- $font : mixed
- $x : mixed
- $y : mixed
- $string : mixed
- $color : mixed
Tags
zp_drawRectangle()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_drawRectangle(mixed $image, mixed $x1, mixed $y1, mixed $x2, mixed $y2, mixed $color) : mixed
Parameters
- $image : mixed
- $x1 : mixed
- $y1 : mixed
- $x2 : mixed
- $y2 : mixed
- $color : mixed
Tags
zp_graphicsLibInfo()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_graphicsLibInfo() : mixed
Tags
zp_getFonts()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_getFonts() : mixed
Tags
zp_imageLoadFont()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageLoadFont([mixed $font = NULL ][, mixed $size = 18 ]) : mixed
Parameters
- $font : mixed = NULL
- $size : mixed = 18
Tags
zp_imageFontWidth()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageFontWidth(mixed $font) : mixed
Parameters
- $font : mixed
Tags
zp_imageFontHeight()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageFontHeight(mixed $font) : mixed
Parameters
- $font : mixed
Tags
imageBlurGD()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
imageBlurGD(mixed $imgCanvas, mixed $imgCanvas2, mixed $radius, mixed $w, mixed $h) : mixed
Parameters
- $imgCanvas : mixed
- $imgCanvas2 : mixed
- $radius : mixed
- $w : mixed
- $h : mixed
Tags
zp_imageFromString()
Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.
zp_imageFromString(mixed $string) : mixed
Parameters
- $string : mixed