How to use custom function aliases in PHP
I want to use db_esc() instead of mysql_real_escape_string(). I dont want to call mysql_real_escape_string each time when I need a query. I can write a custom function but I want to declare a function-alias if possible.
I could use own function:
function db_esc($str){
return mysql_real_escape_string($str);
}
I would prefer something like this:
function_alias( 'db_esc', 'instead of mysql_real_escape_string' );
Any idea?
Similar entries
- Between operator in PHP
- Page generation time and http-referers with PHP
- Call to undefined function money_format()
- PHP get page title function
- Sleep Function for JavaScript like PHP
- How to override php mail function to catch abuse / spammer
- Fatal error: Call to undefined function taxonomy_field_insert() in i18n_taxonomy.module on line 362
- Get top 100 words / keywords from a text with PHP
- How to hide / encrypt CCK Email field with JS against spammer
- Fatal error: Call to undefined function block_list() in /includes/theme.inc on line 1586
- Simple Hello World Module for Drupal 6
- php
- Mysql update table if field exists
- Function ereg() is deprecated in C:\wamp\www\drupal\includes\file.inc on line 902
- Fix swfupload fake flash player error
- Case-insensitive replace with Mysql
- Search in text files recursively with PHP - Grep
- need help for customizing PHP-grep files search
- Install Curl on PHP5 Webmin + Debian
- What is difference between print_r and var_dump in PHP?

Post new comment