We're Moving to a New Support Platform – Starting June 1st!
We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.
You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.
While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.
We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.
Thanks for your continued support and trust – we’re excited to bring you an even better support experience!
Hi,
I have set up a table to be editable, however it is in a different schema to my wordpress installation. When I set the table to be edited, it appends the wordpress schema name as prefix, in front of the full schema.table name.
I have checked the user permissions and the default wordpress mysql account has full permissions to the desired schema.
Is there any way to stop the plugin appending the default wordpress schema name to the front of the table name? i would be willing to have to enter in the full schema.table name for each table that needs updating (as opposed to just the table name at current).
I don't want to change the plugin settings to a custom one as I still need other tables to write to databases within that schema, so if i change it they will become useless.
Cheers,
Dave
UPDATE: I have managed to fix the problem by adding in a column to the wpdatatables table that holds the schema name for the table i want to write too. I then just replaced if statement at line 336 in the wdt_ajax_actions.php file with:
$newwpdb = new wpdb(DB_USER, DB_PASSWORD, $mySqlSchemaName, DB_HOST);
if ($idVal != '0') {
$res = $newwpdb->update($mySqlTableName,
$formData,
array(
$idKey => $idVal
)
);
if (!$res) {
if (!empty($newwpdb->last_error)) {
$returnResult['error'] = __('There was an error trying to update the row! Error: ', 'wpdatatables') . $newwpdb->last_error;
} else {
$returnResult['success'] = $idVal;
}
} else {
$returnResult['success'] = $idVal;
}
} else {
$returnResult['is_new'] = true;
$res = $newwpdb->insert($mySqlTableName,
$formData);
if (!$res) {
$returnResult['error'] = __('There was an error trying to insert a new row! Error: ', 'wpdatatables') . $newwpdb->last_error;
} else {
$returnResult['success'] = $newwpdb->insert_id;
$idVal = $newwpdb->insert_id;
}
}
And placed the below on a line below line 196 in the same file.
$mySqlSchemaName = $tableData->mysql_table_schema_name;
You can then just use the normal windows to set it all up. You just put only the table name in the editable table box in the table settings, and then put the schema name in the new column manually.
Hi Dave,
Thank you for your purchase.
I am glad that you have resolved your issue.
Best regards.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables