Deprecated
This function is deprecated, and we recommend using the DB:Query() function from Database API.
Runs a custom SQL query.
Syntax
CustomQuery(XVar sql)
Arguments
sql
a SELECT clause. Example: "select * from UsersTable where ID=32".
Return value
Returns the recordset.
Example
A query that returns data:
string sql = "select count(*) as c from carsmodels group by make";
XVar rs = tDAL.CustomQuery(sql);
XVar data = CommonFunctions.db_fetch_array(rs);
HttpContext.Current.Response.Write("Number of producers: " + data["c"].ToString());
See also: