Where Is Sql ?

Hello,

I am very confused with this framework. So far I was working with CodeIgniter, but now my colleagues want me to start using Yii. I am reading the documentation and some things doesn’t get any clearer to me.

First, after generating the basic application that gives us Log in system, I do not understand how it was made. I can not find any SQL, where is it ? Also when I use Gii to generate CRUD, again I can not find any sql.

I see that Yii have a lot of predefined methods and classes, but when I read documentation about them, I do not get any clearer how to use them and where.

Is there any book or guide that actually explains how to use this framework and what is going on here ? The Definitive Guide to Yii is not helping me at all to understand how to work with Yii.

Thanks

hey trance

Yii is quite different compare to CI, It uses a ORM for manipulating data in your database. all the sql is generated by Yii, you can write your own sql though, in some cases that is okay but mostly ORM works, ORM gives you an abstraction layer.

What i would suggest you keep developing with Yii all of this sink in as time go pass so do panic just enjoy developing Yii, I promise you there will be a time you will appreciate all that Yii does for you out of the box I am old time lisp programmer have programmed in many languages used many frameworks I enjoy developing with Yii.

there are lot of resources there is blog tutorial, there is yii guide there is a irc channel as well.

I have never worked with ORM so far.

What about advanced queries like JOIN’s ? Gii can not generate that ?

Yes, it can. If you set up the necessary relations in your database schema, Gii should automatically set those relations up in your model.

If you’re new to Yii and struggling, I highly suggest you do the blog tutorial. It’ll give you a bit of a leg up so that, when you go through and read the definitive guide after (which I’d also recommend), everything should make more sense.

Ok I will do it like that. Thanks