column count doesn't match value count at row 1



        foreach(array_combine($patas,$thumbs) as $val => $val1)
            //echo $val;
            $objhelperClass->insert(IMAGES," `image`,`thumb`,`pid`,`link` ","'".$val."','".$val1."','".$pid."' ");

That error means you haven't listed your columns correctly and you're trying to insert more or less fields than you have specified columns.
You list image, thumb, pid and link as columns but have only listed $val, $avl1 and $pid to match them.

ok thanks for the reply but can you tell me how to procees as I am new to this

Simply make sure that for each column you have listed as a target you have a corrsponding value being entered. As a basic SQL example, this won't work:

UPDATE products(col1, col2, col3, col4) VALUES('1','2','3');

because a value is missing for one of the specified columns. In your example I pointed you to the missing $link variable.