All I'm really concerned with is the actual query string. If the value has a percent, it must be treated as a string literal in the query, not a number, and so must be quoted.
$_POST['foo'] = '25%';
$foo = mysql_real_escape_string($_POST['foo']);
$sql = "INSERT INTO table_name (col_foo) VALUES('$foo')"; // value must be quoted
// this would fail with SQL syntax error:
$sql = "INSERT INTO table_name(col_foo) VALUES($foo)";
And if you used a prepared statement with the newer MySQLi extension, you could pretty much avoid worrying about it by using a "s" type designator for the bound parameter, and let it take care of the escaping and quoting as needed:
$stmt = $db->prepare("INSERT INTO table_name (foo_col) VALUES(?)");
$stmt->bind_param('s', $foo);
$foo = $_POST['foo'];
$stmt->execute();