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

join not working

$
0
0
THis returns error 500

<?php

/*
 * Editor server script for DB table caseinfo
 * Automatically generated by http://editor.datatables.net/generator
 */

// DataTables PHP library
include( "lib/DataTables.php" );

// Alias Editor classes so they are easy to use

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


// Build our Editor instance and process the data coming from _POST
Editor::inst( $db, 'caseinfo' )
	->fields(
		Field::inst( 'casename' ),
		Field::inst( 'casetype' ),
		Field::inst( 'factsnum' ),
		Field::inst( 'socialsecurity' )
			->validator( 'Validate::maxLen', 4 ),
		Field::inst( 'primdob' )
			->validator( 'Validate::dateFormat', 'D, j M y' )
			->getFormatter( 'Format::date_sql_to_format', 'D, j M y' )
			->setFormatter( 'Format::date_format_to_sql', 'D, j M y' ),
		Field::inst( 'id' ),
		Field::inst( 'userid' ),
		Field::inst( 'agencyid' )
	)
	  ->join(
        Join::inst( 'users', 'object' )
            ->join( 'userid','member_id'  )
            ->field(
          Field::inst( 'fname' )		
            ) 
	//->where($a, $b, $c)

	->process( $_POST )
	->json();
	
	?>

I also notice in this documentation you tend to use

->field ()

->fields()

interchangeably.
http://editor.datatables.net/tutorials/php_join
Am I missing something ?

Viewing all articles
Browse latest Browse all 82121

Trending Articles



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