0

I have been using Yii with MAMP for the last week without problem. However, today, I set up a new project, created a database and tried to use Gii to create a new model but it's giving me a message "table name doesn't exist."

I have confirmed many times that such a table exists in PHP MY Admin. I also did a reinstall on MAMP and have the same problem

Can anyone see what the problem might be

databse test1

This is my database

This is my configuration in the Yii config file

'db'=>array(
            'connectionString' => 'mysql:host=localhost;port:8889;dbname=test1',
            'emulatePrepare' => true,
            'username' => 'root',
            'password' => 'root',
            'charset' => 'utf8',
        ),

enter image description here

mjmitche
  • 2,077
  • 5
  • 24
  • 31

1 Answers1

1

I'm a bit rusty, but ... case sensitivity? Are column and table name case sensitive in MySQL?

Screenshot also states that no tables were found in the test1 database.

Community
  • 1
  • 1
James Skemp
  • 8,018
  • 9
  • 64
  • 107
  • I just noticed the 0 table count also. Seems inconsistent with the view to the right of two tables. Been a very long time since I used phpMyAdmin – martynthewolf Jun 01 '11 at 11:16
  • Just installed phpMyAdmin (albeit on Windows) and the part of the interface I see here is a bit different than what I was seeing. Could be an older version (I thought databases only displayed on the left). – James Skemp Jun 01 '11 at 11:18
  • @martswite @James Skemp I refreshed php my admin and now it lists the tables (where it said no tables) but it still has same problem – mjmitche Jun 01 '11 at 11:29
  • The 0 table count on the left is in a good old frame so it's not necessarily being updated each time the user makes an action on the right frame. – baraboom Jun 01 '11 at 11:29
  • Ah yes, that's right - they do use frames. And I see you updated the case you're using. Have you tried cutting out the middle man and just creating a new test connection using the base functionality? That would help verify that it's not a connection issue. – James Skemp Jun 01 '11 at 12:32
  • There's no connection issue. Yii has that test built in and lets me know if no connect. I'm getting this error message. 10:25:21.298616 error system.db.CDbCommand CDbCommand::fetchAll() failed: SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected. The SQL statement executed was: SHOW COLUMNS FROM `Employee`. in /Applications/MAMP/htdocs/demo/index.php (13) – mjmitche Jun 01 '11 at 14:25
  • At this point you're sadly beyond me. You should update your question with the information from your last comment on this answer; exact error returned is good to know. – James Skemp Jun 01 '11 at 15:01