Hi,
thanks for your question!
To be honest, for such big projects, you should not be using TablePress as a foundation, as you would always be dependent on it.
Instead, you should really consider a good schema for a custom database table (with mySQL) that you access with direct PHP code (e.g. via the WP_DB class in WordPress).
This will give you much more flexibility. TablePress is just not a good tool for this, as this is way above the intended use case.
Regards,
Tobias
Hi there,
I had developed a WordPress website 1 year ago using WordPress and have used table press for all the data.
Now, I am planning to make an android application for that website. I need to get all the table data in a Native Android application.
Can you suggest me a proper way of doing this? I will be needing the same database that is present on the WordPress, so in this way, I just have to update one database of the WordPress website and then, as I will be fetching the data from that database, It will automatically get updated.
I am planning to donate a few bucks from my budget, as I am really impressed with your work.
Thanks
Kind Regards,
Zohair Hemani.
Hi,
that’s an interesting problem…
Unfortunately, I have never worked with Android apps, so I’m not sure what the best process would be. Most likely, you’ll need to develop some API to access WordPress.
As that will be done in PHP, you could then use the internal TablePress functions to retrieve the tables.
How you would start that API, I don’t know though 🙁
Regards,
Tobias
Hi there,
Keeping Android application aside for a moment, Tell me one thing, If I want to get my WordPress table press database table data, and show it in a browser using a simple PHP file, just tell me how to get the table ID and the function that is being used in your plugin so I can fetch all the data from my wordpresss tablepress database and ECHO it in a browser.
Once my table press database data is ECHO’ed in a browser, I can then use it accordingly and use it in my android application.
Hoping to hear from you soon 🙂
Thanks
Kind Regards,
Zohair Hemani.
Hi,
you can see that in the class-render.php. That basically contains the conversion of the table to HTML code. You’ll probably want to do that yourself, so the relevant code for you is in the controller-frontend.php.
There, the table ID comes from the Shortcode. That is then given to the function
$table = TablePress::$controller->model_table->load( $table_id );
$table['data] then contains a two-dimensional array with the data.
Regards,
Tobias