Hi I am trying to see if data tables will be useful in my project.
I am creating a custom post type of Events, one of the column is attendees. I want the font end users to change the attendees and add events from front end.
I opened your sandbox to test this functionality.
I used "Generate a query to WordPress database" to build a query for pages and selecting page id, page author and page title.
it came up with this query'
SELECT posts_page.ID AS page_ID, posts_page.post_title AS page_post_title, posts_page_author.display_name AS page_post_author FROM wp_posts AS posts_page INNER JOIN wp_users AS posts_page_author ON posts_page_author.ID = posts_page.post_author WHERE 1=1 AND posts_page.post_type = 'page'
I enabled front end editing and set page_ID as id column
Now the table is there and all but when I try to edit it, it gives this error
" Error! There was an error trying to update the row! Error: Unknown column 'page_ID' in 'where clause'"
I am thinking there is something wrong with the sql query.
At this moment you can edit data in one table at the time. Because of nature of creating a table from query we are unable to prevent turning on editing based on number of tables used in it so it will remain possible to turn on editing on such a table. Sorry for misunderstanding.
List of limitation for table editing could be found in our - Documentation
Hi I am trying to see if data tables will be useful in my project.
I am creating a custom post type of Events, one of the column is attendees. I want the font end users to change the attendees and add events from front end.
I opened your sandbox to test this functionality.
I used "Generate a query to WordPress database" to build a query for pages and selecting page id, page author and page title.
it came up with this query'
SELECT posts_page.ID AS page_ID,
posts_page.post_title AS page_post_title,
posts_page_author.display_name AS page_post_author
FROM wp_posts AS posts_page
INNER JOIN wp_users AS posts_page_author
ON posts_page_author.ID = posts_page.post_author
WHERE 1=1 AND posts_page.post_type = 'page'
I enabled front end editing and set page_ID as id column
Now the table is there and all but when I try to edit it, it gives this error
" Error! There was an error trying to update the row! Error: Unknown column 'page_ID' in 'where clause'"
I am thinking there is something wrong with the sql query.
Please advice what to do.
Thank you
Riz
Anyone can help with this?
Hi Rizwan,
Thank you for your inquire.
At this moment you can edit data in one table at the time. Because of nature of creating a table from query we are unable to prevent turning on editing based on number of tables used in it so it will remain possible to turn on editing on such a table. Sorry for misunderstanding.
List of limitation for table editing could be found in our - Documentation