Escapes data for use in a MySQL query
This is just a handy shortcut for $wpdb->escape(), for completeness’ sake
Signature
esc_sql( $sql )
- sql
- (string) Unescaped SQL data
Return
(string) The cleaned $sql
Source
function esc_sql( $sql ) {
global $wpdb;
return $wpdb->escape( $sql );
}
WP Trac GitHub Bitbucket
Link here
-
URL
http://queryposts.com/function/esc_sql/ -
HTML
<a href='http://queryposts.com/function/esc_sql/'>esc_sql()</a> -
Markdown
[esc_sql()](http://queryposts.com/function/esc_sql/) -
BBCode
[url=http://queryposts.com/function/esc_sql/]esc_sql()[/url]