检查2个字段,如果有一个数字的一​​部分改变其他

I have a 2 columns under a table called tbl_data

cat_id and ip_url

Need an order to check all fields if ip_url has a number like http://0.00.00.00 then change cat_id to a certain value

i want to change only fields which starting with http://0.00 coz last 4 digits is not the same in all fields how can i do it ?

You can use LIKE to achieve this.

For example:

UPDATE tbl_data SET cat_id = 'something' 
WHERE ip_url LIKE 'http://0.00.%'
                               ^ anything after

For more information on the usage of LIKE, visit the following link: