gH0StArthour

mysqli_stmt_bind_param workaround

Aug 27th, 2011
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. function my_mysql_query() {
  2.     $numargs = func_num_args();
  3.     $types = '';
  4.     for ($i = 0; $i < $numargs; $i++) {
  5.          $arg = func_get_arg($i);
  6.          if (is_numeric($arg)) {
  7.              $types.="i";
  8.          }else{
  9.              $types.="s";
  10.          }
  11.          $args[($i+1)] = $arg;
  12.          unset($arg);        
  13.     }  
  14.     $args[0] = $types;
  15.    return call_user_func_array('mysqli_stmt_bind_param',$args);  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment