Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the component, uses, how can we do and what is the better way?



What is the component, uses, how can we do and what is the better way?..

Answer / Ashish Kumar Mishra

DB Component: It is used for handling database operations. To perform database operations, first, instantiate the CDbConnection class, which extends CComponent, and then use it to access various methods like createCommand(), execute(), or query(). The best practice is to use Yii's Active Record patterns (ActiveRecord or DataReader) instead of directly using DB component for a cleaner, more efficient, and easier-to-maintain code.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Yii PHP Framework Interview Questions

What are the naming convention in yii 2.0 framework?

1 Answers  


What is the naming convention in yii framework? Explain

1 Answers  


What are the advantages of yii2?

1 Answers  


What is name of first file the loaded when yii 2.0 framework starts?

1 Answers  


Why do yii run so fast?

1 Answers  


What is components in yii?

1 Answers  


What is the difference between yii & yii2?

1 Answers  


What is the first file that gets loaded when you run a application using yii?

1 Answers  


Benifits of yii over other frameworks?

1 Answers  


How to use session in yii?

1 Answers  


Explain directory structure of yii 2 framework?

1 Answers  


How to use find() and findall () in yii2?

1 Answers  


Categories