0

There is an error That solve with some refresh.

What is the problem? (I have already set royalshoe into config/database)

Error:

Unable to select the specified database: royalshoe

Filename: C:\xampp\htdocs\royalshop\system\database\DB_driver.php

Line Number: 140
Vahid Najafi
  • 4,654
  • 11
  • 43
  • 88
  • have you auto loaded database and set database settings correct. It also could be something wrong in your code not matching the db table but unsure because need to see your controller / model where error comes from. –  Mar 05 '15 at 15:17
  • see this question: http://stackoverflow.com/questions/15503757/codeigniter-showing-error-as-unable-to-select-the-specified-database-projec – Vali S Mar 05 '15 at 15:18
  • I think the problem occur due to `xamp` – Vahid Najafi Mar 05 '15 at 15:21
  • please provide your controller and model in order for us to help you – CodeGodie Mar 05 '15 at 17:17

1 Answers1

2

If you are using XAMPP you first need to run SQL admin (to access phpAdmin panel), then ALWAYS create a database and then load it from file (your database name.sql). Make sure you never load a database in phpAdmin without creating one first.

Once you've done that, make sure all config files (such as database.php and DB_driver.php) are configured correctly for the right database name.

Ksenia
  • 21
  • 3