All pastes #765397 Raw Edit

Someone

public php v1 · immutable
·published 2007-11-08 00:01 UTC
rendered paste body
function sqlesc($value) {    // Stripslashes   if (get_magic_quotes_gpc()) {       $value = stripslashes($value);   }   // Quote if not a number or a numeric string   if (!is_numeric($value)) {       $value = "'" . mysql_real_escape_string($value) . "'";   }   return $value;}