db_query

resource db_query (string query)

Queries the current database using SQL.

NOTE: This is a SQL function. See Database Support for more information.

Arguments

query is the SQL query string.

Result

A resource if the query delivers a valid result, FALSE otherwise.

Example

// List the field(column) "Tel./Fax" in mytable

$result = db_query("SELECT 'Tel./Fax' FROM mytable");
$tel_fx_nrs = db_fetch_array($result);


See also

db_free_result
Database functions
Database support