query

(/rs/public/functions.mysql.php)

query -- Execute a query on the MySQL database.

Description

resource query ($query)

This function can be used to execute any query on the database. The result of the query is returned.

This function returns false on failure, or if a MySQL Error is generated.

Examples

query ("INSERT INTO table SET A = 1") /* Executes the insert query and returns the result (boolean true upon success, false upon failure). */

query ("SELECT A FROM table") /* Executes the select query and returns the result. */

query ("foo") /* Returns false, this query would error. */

Related Functions

data

Dependencies

None.

Function Index