-
Notifications
You must be signed in to change notification settings - Fork 149
"Must select a database" #14
Comments
Yes. You will need to edit the class.db-api.php file in the include folder. This is the manual process.
|
It doesn't help at all. Same result. I know the info I give it is good because I have a separate test page that returns data. Trying to reverse engineer this, starting with shortcode_atts. |
When you received the error message "Select a database", this means your config.php and class.db-api.php files have not been configured correctly. what do you have in the config.php and class.db-api files? |
They're below. With that said, it's failing in parse_query because there's no query string. If I put db and table in the query string (not intended per the instructions ... and doing so makes no sense anyway), I then get invalid database. Doesn't make sense given how my little test page returns data from the db with the same credentials. $args = array( register_db_api( 'berkeleywv-fe-inspections', $args );
|
This appears to be a database and server access issue. Test your sample db_user , db_pass, db_host and db_name in a separate SQL Admin tool to see if you can access the database server. |
That "test page" is separate from db-to-API. Phpmyadmin has no issues either. Sent from my iPhone
|
okay, try accessing one of your tables in the database. |
Must select a database Sent from my iPhone
|
Absolutely a database connection to web server issue. This is usually resolved by changing your database binding in the my.cnf configuration. |
Not so fast: http://data.mike-pulsifer.org/test.php Sent from my iPhone
|
Problem with code. Does not work that way. test.php cannot be converted to REST |
I know. It just proves I can get to the db. Sent from my iPhone
|
Have you solved that? I meet the same problem. |
FWIW, I've been unable to replicate the problem. |
@alpheustechnologies You're saying we have to edit the config.php and class.db-api.php. Why have a config file then? |
@i faced the same problem. I've followed all the comments in this post, and still see
I've used the same settings in MySQL Workbench and I can connect to my db fine. What should I put for dataset-name ? |
same problem! |
You do not need to edit class.db-api.php. You need to edit config.php and .htaccess to fit your configuration: config.php: .htaccess: then to access whateveryouwanttonameyourdataset dataset go to yourdomain.com/folderyoumadeforthisproject/whateveryouwanttonameyourdataset/yourtablename.json |
.htaccess RewriteBase was wrong for me :) Changed it to my project path, ty man. |
I set up the config.php as instructed and I'm getting "Must select a database." Is there nothing else I need to edit?
The text was updated successfully, but these errors were encountered: