Example #1
0
/**
 * Checks if a character is an SQL identifier
 *
 * @param string   character to check for
 * @param boolean  whether the dot character is valid or not
 * @return  boolean  whether the character is an SQL identifier or not
 */
function PMA_STR_isSqlIdentifier($c, $dot_is_valid = false)
{
    return PMA_STR_isAlnum($c) || ($ord_c = ord($c)) && $ord_c >= 192 && $ord_c != 215 && $ord_c != 249 || $c == '_' || $c == '$' || $dot_is_valid != false && $c == '.';
}
Example #2
0
/**
 * Checks if a character is an SQL identifier
 *
 * @param   string   character to check for
 * @param   boolean  whether the dot character is valid or not
 *
 * @return  boolean  whether the character is an SQL identifier or not
 *
 * @see     PMA_STR_isAlnum()
 */
function PMA_STR_isSqlIdentifier($c, $dot_is_valid = FALSE)
{
    return PMA_STR_isAlnum($c) || PMA_STR_isAccented($c) || $c == '_' || $c == '$' || $dot_is_valid != FALSE && $c == '.';
}