Connecting control to the database

Hi…im new to Yii framework. i want to know how to create a custom form(add my own controls) and perform data manipulation tasks like insert,delete,retrieval and updation. Is there a way to connect to the database using the code??? I mean i dont want to use the generators in the GII to create the model.How do i specify that the contents of a textbox or a dropdown list box must be saved to a particular table when a button is clicked.

pls help. Thanks in advance

Create Module with GII and than modify it as per your requirement.

follow this tutorial