Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82212

DELETE from table with database name prefix in Editor PHP

$
0
0

Hello, I think there is a little inconsistency using database name prefix in Editor (1.6.3)
Suppose I have something like
$editor = Editor::inst( $db, 'db.table' )
and all fields referencing db.table.field
Then I'm not able to delete records from this table.
In Editor.php file there is a _remove_table function with condition:
$this->_part( $field->dbField(), 'table' ) === $table && ...
The table on the left side doesn't have a prefix while on the right side there is a db.table variable.
I think that's why the DELETE query is never generated.
There should be probably something like:
$this->_part( $field->dbField(), 'db' ).'.'.$this->_part( $field->dbField(), 'table' ) === $table && ... instead.


Viewing all articles
Browse latest Browse all 82212

Trending Articles