Wh1t3projects' PHP framework. Small PHP framework for building web apps and websites
Syntax: SQL_select(string $columnName, string $tableName [, string $whereColumnName, string $whereValueToSearch])
Execute a select query on the SQL server
Parameters
columnName
The column to select
tableName
The table to execute the select in
Optional whereColumnName
The column to use in a where condition
Optional whereValueToSearch
The value to look for in the column specified by whereColumnName
Return values
A table containing all the results. Null if an error occurred
Examples:
Get everything from table config
SQL_select("*", "config");
Get URL from table config
SQL_select("URL", "config");
Get URL from table config where the column active is 1
SQL_select("URL", "config", "active", 1);
Additional information
Unlike SQL_query, all strings sent to this function are escaped before being sent to the SQL server. That means that any query sent by this function should be safe to execute.