Skip to content
bonsak edited this page Nov 20, 2012 · 1 revision

#pods_query() Standardize queries and error reporting. It replaces @wp_ with $wpdb->prefix.

function pods_query ( $sql, $error = 'Database Error', $results_error = null, $no_results_error = null )

###Parameters

Parameter Type Details
$sql string SQL Query
$error string (optional) The failure message
$results_error string (optional) Throw an error if a records are found
$no_results_error string (optional) Throw an error if no records are found

###Returns

(int) ID of INSERT or REPLACE, (array) Array of Objects for SELECT, (mixed) Return of $wpdb->query for all others

###Available Since Version

2.0+

Source File

pods_query() is located in /pods/functions.php