Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9067797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:01:58+00:00 2026-06-16T17:01:58+00:00

From config/main.php : ‘db’=>array( ‘connectionString’ => ‘mysql:host=localhost;dbname=testdb’, ’emulatePrepare’ => true, ‘username’ => ‘root’, ‘password’

  • 0

From config/main.php :

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

When I use the gii model generator (http://localhost/yii/testdelete/index.php?r=gii/model) and try to put “post” or “user” in the table name and click “Preview” it says:

Table ‘post’ does not exist.

I want to be able to create models using those tables.

Exporting from phpMyAdmin:

-- Host: 127.0.0.1
-- Database: `testdb`

CREATE TABLE IF NOT EXISTS post (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
created_on int(11) unsigned NOT NULL,
title varchar(255) COLLATE utf8_unicode_ci NOT NULL,
content text COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS user (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
username varchar(200) COLLATE utf8_unicode_ci NOT NULL,
password char(40) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T17:01:59+00:00Added an answer on June 16, 2026 at 5:01 pm

    If you type “s” into Table Name field auto complete should pop up with both tables.

    check that

    1. you have saved the config file (close it and open again to verify its content)
    2. you have one db section in your config file (maybe you have sqlite one overwriting it)
    3. check that you are on same mysql instance. phpMyAdmin host 127.0.0.1 doesnt meant its the same instance, its the instance phpMyAdmin runs on (check the url). Login from command line (or use wonderful desktop client http://www.heidisql.com/) to poke around in localhost database
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Yii project with a main.php config file and dev.php config file
I am having a problem with PHP from that adds data to MYSQL database
In oscommerce, I have set the DIR_WS_IMAGES from the config.php to be an external
Suppose i have a php file named main.php It Contains following code include 'config.php';
How can I access web folder from config.yml in a symfony2 app ? I
i read data from my config file like this: ip_vlan1 = 10.10.($id+100).5 ip_vlan2 =
Here is the config from shiro.ini shiro.loginUrl = /login.jsp ######### URL CONFIG ################### [urls]
Here's the line from App.Config: <add key=CheckFileFormatString value=P{0}\t&quot;{1}, {2}&quot;\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}\t{10}/> Here's the code that puts
How do I read connection strings from custom config file (say abc.config) using WebConfigurationManager
I am testing whether option from app.config listed below Is applied to all transactions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.