Is there a mysql function that will check a row depending on whether the variable in the field is an integer or not??
(i know about is_int with php)

Columname= 'id'
Columtype = 'varchar(255)'

I have id's in it such as 1,2,3 and also texts like first, second.

Now i try to count everything from the table where Colum == integer and not to select the text (first,second).
(like: "select count(id) from table where id==integer or id!=text)

Hope someone can help me out with this.

    SELECT COUNT(id) FROM table WHERE id NOT REGEXP "[A-Za-z]"

    Hope this helps 😉

    EDIT:
    This is better -

    SELECT COUNT(id) FROM table WHERE id REGEXP "[0-9]+$"

      Write a Reply...