Holiday Notice – Support Unavailable on April 18 and April 21
We just wanted to let you know that our support team will be offline on Friday, April 18th (Good Friday) and Monday, April 21st (Easter Monday) due to the holidays.
We'll be back on Tuesday, ready to assist you!
In the meantime, if you need any help, feel free to:
-
Use the support widget in the bottom right corner on our websites (Amelia and wpDataTables) — our latest AI-powered assistant is there 24/7 to help with basic and intermediate questions,
-
Browse our detailed documentation (Amelia, wpDataTables)
-
Explore helpful articles,
-
Or check out our YouTube channels for video guides!
Amelia YouTube Channel
wpDataTables YouTube Channel
Thank you for your understanding, and we wish you a wonderful holiday weekend!
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