Yii Framework Forum: Little error in documentaton - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Little error in documentaton Rate Topic: -----

#1 User is offline   cosimfi74 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 06-November 08

Posted 06 November 2008 - 12:08 PM

Hello in the guide "The Definitive Guide to Yii"  in the section  "Creating First Yii Application"  I found this

            'db'=>array(
            'connectionString'=>'sqlite:protected/data/source.db',


Then you explain the model and crud function but this not working. 
Is necessary to insert in CDbConnection to using AR for model and crud function.

I suggest to add this (is usefull for the MYSQL)

'db'=>array(
            'class'=>'system.db.CDbConnection',
    'connectionString'=>'mysql:host=localhost;dbname=namedb',
            'username'=>'user',
            'password'=>'1234',
            'schemaCachingDuration'=>3600,
),

bye bye from Italy

0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,879
  • Joined: 04-October 08
  • Location:DC, USA

Posted 06 November 2008 - 12:18 PM

What is the error message you saw?

By default, 'db' component will use class 'CDbConnection'. So you don't need to explicitly specify its class property.


0

#3 User is offline   cosimfi74 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 06-November 08

Posted 06 November 2008 - 12:55 PM

Sorry.
But now is working :o.... I don't know... I'm not drunk....
I cannot replicate the error....ignore my message.

I saw this error with crud."Error: Table "nametable" does not have a primary key."....
(the table have a primary key).
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users