return the next row from a query
array
db_fetch_array
(resource $sql)
-
resource
$sql: db query handle
run an sql query and return the sql handle for further requests
resource
db_get
(string $q, [boolean $fatal_sql = 0])
-
string
$q: the sql query, properly constructed and quoted
-
boolean
$fatal_sql: db errors are fatal
returns the name of the database software that is being talked to
string
db_get_name
()
run an sql query and return the single (or first) row returned
mixed
db_get_single
(string $q, [boolean $fatal_sql = 0])
-
string
$q: the sql query, properly constructed and quoted
-
boolean
$fatal_sql: db errors are fatal
db_get_version (line
193)
returns the current version of the database that is being talked to
string
db_get_version
()
return the last insert ID from the database
integer
db_new_id
()
get the number of rows returned by a query
integer
db_num_rows
(resource $sql)
-
resource
$sql: db query handle
run an sql query without returning data
integer
db_quiet
(string $q, [boolean $fatal_sql = 0])
-
string
$q: the sql query, properly constructed and quoted
-
boolean
$fatal_sql: db errors are fatal
echo the SQL query to the browser
void
echoSQL
(string $echo, [boolean $success = 0])
-
string
$echo: the sql query
-
boolean
$success: query was successful
echo the SQL query to the browser
void
echoSQLerror
(string $echo, [boolean $fatal = 0])
-
string
$echo: the sql query
-
boolean
$fatal: die on error
quickSQLSelect (line
162)
construct and perform a simple SQL select
mixed
quickSQLSelect
(string $table, mixed $key, mixed $value, [boolean $fatal = 1], [boolean $countonly = 0])
-
string
$table: name of the table (will have TABLEPREFIX added to it
-
mixed
$key: single column name or list of columns for the WHERE clause
-
mixed
$value: single value or list of values for WHERE $key=$value
-
boolean
$fatal: die on error
-
boolean
$countonly: run a COUNT(*) query not a SELECT query