Bug fix for SQL parameter replacing function.

It will not handle Postgres casting operations correctly (::datatype) and won't try to replace them with parameters

Failing Example: 
```$query = "a=? OR (1)::string OR b=?";```