Reputation: 1
I am beginner in work on xampp and I setup my localhost. I install Lampp on linux ubuntu 12.04 and copy the folder of my site in /opt/lampp/htdocs. this folder is exist on webserver and it works.now Xampp, PHPmyadmin, MySQL work truly on my pc and I can see my tables and database in phpmyadmin, every thing on my local host is true except when I want to load index.php of website I see below database error :
A database error occurred while performing the requested procedure. Please review the database error below for more information.
/opt/lampp/htdocs/product/domains/product.behinyab.ir/libs/kohana/libraries/drivers/Database/Mysql.php [368]:
There was an SQL error: No database selected - SELECT `id`, `route` FROM `arag_static_pages` WHERE `appname` = 'arag'
I search this subject on google and read more things but I cant solve this problem yet. anyone can solve it?
Upvotes: 0
Views: 628
Reputation: 2588
specify which database you are querying. YOu can either do that in the connection, or in the query, in the following manner:
SELECT database.table.`id`, database.table.`route` FROM database.`arag_static_pages` WHERE database.table.`appname` = 'arag'
would actually be sufficient to mention which database the table is coming from, so prefixing the table with the db name in the from
Upvotes: 1