I have a table with 2 column in mysql: id(auto_increment) and value(int 0/1). I want to find how many presence match the pattern "101" in the table with PHP. Example:
id | value ---------- 1 | 1 2 | 1 -- 3 | 0 | => (1) 4 | 1 -- 5 | 0 | => (2) 6 | 1 -- 7 | 0 8 | 0 9 | 1 10 | 1 .. | .. .. | .. 5000 | 1 -- 5001 | 0 | => (n) 5002 | 1 -- 5003 | 1 ... | ...
Using Array is faster than search the pattern through mysql (import the value of mysql to an array) ?
Any body know how to find how many presence of "101" in the whole rows using PHP ?
Thanks -jack-