One to Many
One to Many
svonweller
Posts: 12Questions: 3Answers: 0
I am using the "Join tables - one-to-many join logic" on "https://editor.datatables.net/examples/advanced/joinArray.html", but I get the following error:
"DataTables warning: table id=mgmt - Join was performed on the field 'id' which was not included in the Editor field list. The join field must be included as a regular field in the Editor instance."
Using the same libraries. Wondering why the example works and mine does not
This discussion has been closed.
Answers
Hi @svonweller ,
As you say, the examples works so it must be something in your code. Would you be able to post your code here, or link to your page, so that we can take a look,
Cheers,
Colin
===
PHP
====
HTML
==
JS
Posts above - Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
I'm 99% certain that the issue is because of the use of an alias for the
event
/ev
table. Could you remove your aliases and try it with just the long form names place?Thanks,
Allan
Now, I am getting:
DataTables warning: table id=mgmt - JSON encoding error: Malformed UTF-8 characters, possibly incorrectly encoded
Where (error on this line in jquery.dataTables.min.js):
y(a);if("ssp"!=e||g)"ajax"==e?sa(a,[],function(c){var f=ta(a,c);for(b=0;b<f.length;b++)O(a,f[b]);a.iInitDisplayStart=d;T(a);C(a,!1);ua(a,c)},a):(C(a,!1),ua(a))}else setTimeout(function(){ha(a)},200)}function ua(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&$(a);r(a,null,"plugin-init",[a,b]);r(a,"aoInitComplete","init",[a,b])}function Ra(a,b){var c=parseInt(b,10);a._iDisplayLength=c;Sa(a);r(a,null,"length",[a,c])}function pb(a){for(var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=h.isArray(d[0]),f=
All of our tables are utf8mb4
I wonder if the PHP / database interface is not utf8 though. What database are you using? If its MySQL / MariaDb, try using:
just before the
Editor::inst( ... )
factory call.Allan