Button On Cgridview

Is their a way on how I can run a php function from my model, using a CButtonColumn from a CGridView?

For example: I want to UPDATE a record inside my database, and with just clicking the button I can accomplish my SQL statement

It is not that easy. Buttons are present in UI (page rendered in browser) and there is no access to database from UI. So you need to create action (in same or different controller) that does what you want with specified model and render button that redirects to that action passing model ID.