get length of table sql code example Example: Sql select by content lenght $query = ("SELECT * FROM $db WHERE conditions AND LENGTH(col_name) = 3");