HI There, I’m sure you’ve had this message a million times before so apologies upfront.
I have installed the WP-DB-Table-Editor plugin and added the demo function to my functions.php (changing the table and title names off course) but I could only get the table to show when I removed part of the example function. If I use only the following part of the function I can view the table and the title shows in my menu but unfortunately there are no editing capabilities:
if(function_exists(‘add_db_table_editor’)){
add_db_table_editor(‘title=Affiliates&table=wp_affiliate_wp_affiliates’);
}
Could you please tell me what i am doing wrong as I need to be able to edit one of the columns on a regular basis.
Many thanks in advance.
Chris.
Hi
I’d like to know if there is a hook that makes it possible to add custom code right before the deletion of a row?
Problem with the hook after deletion is that it’s not possible to read a field’s value of the same row via the ID of the row (as the row has been deleted already at that point).
Thanks and best regards
Phil
The plugin will not update values after I have joined one table with another in the select clause. I am trying to enable a client to mass-edit values of a custom taxonomy (specifically, the taxonomy created by the Stock Locations for WooCommerce plugin.)
Here is the code I am working with, which properly displays the table but does nothing when I press “save changes.”
if(function_exists('add_db_table_editor')){
add_db_table_editor(array(
'title'=>'Batch Edit Products',
'table'=>'wp_postmeta',
'id_column'=>"meta_id",
'hide_columns'=>'meta_id',
'noedit_columns'=>(array('Product','Location')),
'sql'=>'
SELECT meta_id, post_title AS <code>Product</code>, name AS <code>Location</code>, meta_value AS <code>Stock</code> from wp_term_taxonomy
JOIN wp_terms ON wp_terms.term_id=wp_term_taxonomy.term_taxonomy_id
JOIN wp_postmeta ON wp_postmeta.meta_key = CONCAT("_stock_at_", wp_terms.term_id)
JOIN wp_posts ON wp_posts.ID = wp_postmeta.post_id
WHERE taxonomy="location"
'
));
}
When I just SELECT the wp_postmeta table and try to make an edit, it works fine.
]]>I try to call this plugin from admin page of my plugin.
I can view and edit the referred table, but saving the changes does not happen. Ajax call passes successfully but DB table is not updated.
There is saying my-plugin/settings.php page in WP admin interface, where I do:
$table='wp_my_table';
if(function_exists('add_db_table_editor')){
add_db_table_editor(array(
'title'=>'My title',
'table'=>$table,
'sql'=>"SELECT * FROM $table ORDER BY class_id ASC",
'id_column'=>'class_id',
'cap'=>'manage_options',
'columnNameMap'=>Array(................),
'default_values'=>Array(................)
));
print(dbte_shortcode(Array('id'=>$table)));
}
This displays the DBTE interface.
Then, when I do some changes and hit ‘Save changes’ button, the following ajax call happens:
"page":"my-plugin/settings.php",
"action":"dbte_save",
"data":"{seem to be correct JSON data}",
"table":"wp_my_table"}
I am confused by the fact that “page” here is referring back to the page where the editor is displayed. Should it refer to some DBTE component instead?
Do I miss some step that binds the frontend interface to DBTE backend?
]]>Hi, Thanks for creating such a wonderful plugin. After updating to version 1.8.2 my site is having the following error.
Notice: Undefined property: DBTableEditor::$nodelete in /wp-db-table-editor/DBTableEditor.class.php on line 117
Notice: Undefined property: DBTableEditor::$noinsert in /wp-db-table-editor/DBTableEditor.class.php on line 118
Thanks
Bikram
on version wordpress 5.2.2, i don’t see menu DB Table Editor after activating the plugin
]]>Hi,
is there a way to define an autocomplete field or a dropdown list with data taken from another table?
Thank you
]]>Hi,
when ‘default_values’ param is defined, field values flush immediately after edited, as soon as cursor moves to another field
ex: ‘default_values’=>’Array(“supp_code”=>”abc”)’,
Thank you
]]>Russ/Bobby, is there a youtube setup video to help us newbies install and configure wp-db-table-editor?
One simple step-by-step walk-through would make a world of difference for users like me that are just learning how to code.
Thanks you in advance. ~SCOT
P.S. If this could be a paid consulting service from Acceleration.net, please let me know. I really need a chalk-talk with this. ??
]]>My table keeps on growing which is resulting in it showing nothing now.
I tried async=true which results in this error:
Failed to load resource: the server responded with a status of 500 (Internal Server Error) /wp-admin/admin-ajax.php?&action=dbte_data&table=old_enrollments:1
Hi!
Thanks for the great plugin.
I’m having a slight issue with exporting to CSV. I have created two tables with your plugin. CSV export works fine for this:
add_db_table_editor(
array(
'title'=>'Committee',
'table'=>'ssbc_committee',
'id_column'=>'ID',
'sql'=>'SELECT * FROM ssbc_committee ORDER BY EndYear DESC'
)
);
But not for this (I get “This page isn’t working ssbc.org.uk is currently unable to handle this request. HTTP ERROR 500”):
add_db_table_editor(
array(
'title'=>'BCD prices',
'table'=>'ssbc_postmeta',
'id_column'=>'meta_id',
'sql'=> "select
post_id,
max(IF(meta_key LIKE 'attribute_pre-drinks', meta_value, NULL)) AS 'Pre-drinks',
max(IF(meta_key LIKE 'attribute_dinner-drinks', meta_value, NULL)) AS 'Dinner drinks',
max(IF(meta_key LIKE 'attribute_post-drinks', meta_value, NULL)) AS 'Post-drinks',
sum(IF(meta_key LIKE '_regular_price', meta_value, NULL)) AS 'Price'
from ssbc_postmeta
WHERE post_id IN (SELECT ID FROM ssbc_posts WHERE post_parent = 3692)
GROUP BY post_id"
)
);
}
Is it an issue with the length of the query? Is there any way round this?
Thank you!
Lois
]]>hi
How can I hide the table rows for users (but not delete in my admin panel)?
Hi, I was wondering if there is an option to have filters in the table. Let me know. Many thanks
]]>Am I doing this corectly?
if(function_exists(‘add_db_table_editor’)){
add_db_table_editor(array(
‘title’=>’Soldier Records’,
‘table’=>’bruce_remembers’,
‘sql’=>’SELECT * FROM soldier_record’
));
}
if(function_exists(‘add_db_table_editor’)){
add_db_table_editor(array(
‘title’=>’Towns, Cemetery, Monuments,…’,
‘table’=>’bruce_remembers’,
‘sql’=>’SELECT * FROM towns_cem_monu’
));
}
if(function_exists(‘add_db_table_editor’)){
add_db_table_editor(array(
‘title’=>’Soldier Serve Records’,
‘table’=>’bruce_remembers’,
‘sql’=>’SELECT * FROM soldier_serve_record’
));
}
I had all the in one if statement but it kept getting overwritten.
Am I missing something? Is there a function to clear the info from the previous function?
Thanks for this plug-in Dave, but it is above my head.
Is there a simple way for me to add a basic text-field called ‘Notes’, to my WP table, that I can then access using Admin Columns, for example, and add to my Elementor Templates page, so I can add a simple note about the template to myself?
So the editable columns doesn’t seem to be working as expected. It does hide the save button but double clicking on the fields still enables the input text field and the delete column is still visible?? My code:
add_db_table_editor(array(
‘title’=>’CSE’,
‘table’=>’old_cse’,
‘id’=>’old_course_enrollments’,
‘id_column’=>’E_ID’,
‘sql’ => ‘SIMPLE SELECT QUERY’,
‘noedit_columns’=>’E_ID’,
‘columnNameMap’=>Array(‘E_ID’=>’ID’),
‘auto_height’=>true,
‘editcap’=>’edit_others_posts’,
));
]]>So I’ve been trying to use your plugin. Added the function in the functions.php, there is nothing being shown on the dashboard and if I add the shortcode it says ‘No Database Table Configured to Edit’
]]>Hi there!
I set up WP-DB-Table-Editor and it shows the table’s records. If I change a record and hit “Save”, in the browser’s console there’s a message:
Save Success 0
db-table-editor.js:48:5
TypeError: cannot use ‘in’ operator to search for ‘length’ in ‘0’
jquery.js:2:4218
And the record is not updated. Can you point out, what the issue might be?
Thank you very much for your work, really appreciate!
Cheers,
-Bruno.
Hello!
I like your plugin a lot! It is the only one I found that can edit database tables and show them nicely as well as hide some columns ??
I would like to change the width of each of the shown cells. How can I do that? Does it work with Slickgrid? Here width is implemented, but not from the database: SlickGrid Example. Also the auto edit function seems to be great. How can I implement it to this plugin?
Also I would like to totally disable the view of some of the columns. The hidden columns still show, but shrinked.
Thank you ??
Hi,
The plugin is a powerful one but the documentation lacks real life example. Is there any where I can find actual working (mainly editing / updating data) with sample coding?
Best regards.
]]>Hey, the plugin is amazing, exactly what we need. I’m using it in the admin side of WP, the functionalities of your plugin perfectly work except the csv’s export.
A blank page appear with:
Request-URI Too Long
The requested URL’s length exceeds the capacity limit for this server.
Apache/2.4.23 (Win64) PHP/5.6.25
I’m not sure how to fix it, the table to display is quit big (1939 rows), I think that’s why it’s not working. Do you have any idea how could I fix it ?
]]>I installed this pluging on December 17, via the control panel interface, and it shows version 1.5.4
So does the version I downloaded today from the www.ads-software.com site.
But they are not the same.
The Changelog shows versions up to 1.6
Wordpress thinks my plugins are all up-to-date. What is happening? Was there a change with no version number update?
I’m also wondering if there is a problem because the plugin folder is called “wp-db-table-editor” but the main file is called “db-table-editor.php” and it says the plugin name is “DB-table-editor”.
]]>Hi,
I see that the ID column is necessary for this, but can we hide the column (preferable) or prevent it’s editing?
]]>Hi,
First of all thanks for a very useful plugin!
Is it possible to do update/save to multiple tables?
I have a shortcode view that uses an INNER JOIN and I get an error when i try to save changes.
Joined columns are not detected in field list.
]]>Uncaught TypeError: Cannot use ‘in’ operator to search for ‘length’ in <div id=”error”><p class=”wpdberror”>WordPress database error: [Unknown column 'navn' in 'field list']<br />
Is it possible to create the link from another plugin as opposed to the theme’s functions.php file?
I’m trying to avoid hardcoding changes in a theme where the user may change themes (thus making a child theme irrelevant as well).
I’m writing a custom plugin, and would love to be able to create the table link from there instead of the theme’s functions.php
]]>All was ok. I was doing some another work in function.php. I installed a plugin “Postman SMTP”. Suddenly it stopped working. I tried many way:deactivated all the plugin and nothing works.
I downloaded the my theme. And installed it on localhost. in localhost it is ok. what should i do to fix it for server?
I dont know, maybe the slick is not loading.
Hi,
it is possible add an advanced editor, for specific columns of table?
Thanks
]]>I’m dealing with a client’s site which uses a custom-built plugin that handles information across several tables within a database. When I go to “upload CSV file”, the additions are never reflected in the database. Is the upload CSV button supposed to direct to /Test.php?
Would possibly make this task much easier, as I don’t want to have to configure a handful of tables by hand.
]]>Hi,
The changes to the database cannot be saved for some reason. The table detected how many changes I’ve made, but when I clicked on “Save (xx) Changes”, it doesn’t update the database and there is no error message. I even checked the Console and no js error is detected, although it does look like it’s sending empty data via ajax. Can you please help?
The rest of the plugin works like a charm, thanks!
]]>Hello everyone:
I found this plugin not long ago and it is exactly what I need. I have installed it and it works perfectly. I have created an interface in my theme’s functions.php and it works just great. The problem is that I don’t know how to create this interface in my plugin. I have a Top-Menu and a sub menu where I want to create this interface, but I am not able to.
Thanks in advance
]]>