Database - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Database (/showthread.php?tid=58968) |
Database - El Forum - 08-09-2013 [eluser]davy_yg[/eluser] I have the following code: mmahasiswa.php Code: <?php cmahasiswa.php Code: <?php tambahmahasiswa.php Code: <html> When I run this url: http://localhost/mahasiswa/index.php/cmahasiswa/tambahdata A Database Error Occurred Unable to select the specified database: mahasiswa Filename: C:\xampp\htdocs\mahasiswa\system\database\DB_driver.php Line Number: 140 Why is it ? (I have mahasiswa database in phpmyadmin) Database - El Forum - 08-09-2013 [eluser]noideawhattotypehere[/eluser] Any other database function works? Paste your config/database.php (hide password if you have set any) Database - El Forum - 08-09-2013 [eluser]davy_yg[/eluser] config/database.php Code: $active_group = 'default'; Database - El Forum - 08-09-2013 [eluser]sv3tli0[/eluser] A possible problem is if you have more than one SQL servers at your local.. You have to set server port ("localhost:3306") to the server which you use Another problem is if your mysql user don't have access to the table.. you can check that with setting the root username for testing.. Settings - pconnect and db_debug, can cause bugs depending on your local settings. (you can try to disable them one by one just for a test) Database - El Forum - 08-09-2013 [eluser]davy_yg[/eluser] I only use one mysql server (xampp). Setting for root username: root localhost No ALL PRIVILEGES |