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

New Editor Fail!

$
0
0

I upgraded my Editor libraries to take advantage of mjoin.

After doing that, mjoin works great for display, however, none of my tables can edit at all anymore.

Even if I back out the code to all working before mjoin, and then I just replace the libraries, the new ones make any in-line edit return empty data with no updates to the database. Switch the libs back and all is working again.

What is going on?

<?php $siteRoot = substr(__FILE__, 0, -strlen($_SERVER['SCRIPT_NAME']));
      include $siteRoot.'/login/include/datatables/php/lib/DataTables.php';

      use DataTables\Editor,
          DataTables\Editor\Field,
          DataTables\Editor\Format,
          DataTables\Editor\Join,
          DataTables\Editor\Upload,
          DataTables\Editor\Validate;

      Editor::inst($db, 'Booked_Trips', 'TripID')
          ->field(
                    Field::inst('TripID'),
                    Field::inst('OrderID'),
                    Field::inst('NumPass'),
                    Field::inst('NumBags'),
                    Field::inst('CostTip'),
                    Field::inst('Name'),
                    Field::inst('PickupTime'),
                    Field::inst('PickupLocation'),
                    Field::inst('DropoffLocation'),
                    Field::inst('VehicleType'),
                    Field::inst('CostTrip'),
                    Field::inst('CostExtras'),
                    Field::inst('CostTax'),
                    Field::inst('CostTotal'),
                    Field::inst('Mileage'),
                    Field::inst('Duration'),
                    Field::inst('Tolls'),
                    Field::inst('MapLink'),
                    Field::inst('Status')
                  )
          ->where('OrderID', $_REQUEST['order'], '=')
          ->process( $_POST )
          ->json();

The above works for display with either library, but only works for editing with the old library. How can I fix this?


Viewing all articles
Browse latest Browse all 82581

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>