i need var in where
i need var in where
rrzavaleta
Posts: 78Questions: 52Answers: 2
I am getting a variable in php , but I can not use it to define where.
include( "../extensions/Editor-1.3.3/php/DataTables.php" );
$var2=$_POST['ID_CAMPO'];
use
DataTables\Editor,
DataTables\Editor\Field,
DataTables\Editor\Format,
DataTables\Editor\Join,
DataTables\Editor\Validate;
$editor = Editor::inst( $db, 'ING_VALOR_CAMPO' )
->pkey('ID')
->fields(
field::inst( 'ID'),
Field::inst( 'ID_CAMPO'),
Field::inst( 'ID_ASEGURADORA'),
Field::inst( 'VAL_CAMPO') ->validator('Validate::required'),
Field::inst( 'DESC_VALOR') ->validator('Validate::required'),
Field::inst( 'SECUENCIA') ->validator('Validate::required')
)
->where( 'ID_CAMPO', $var2 )
->process($_POST)
->json();
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Looks like it should work okay to me. What aspect of it doesn't work? Are you sending
ID_CAMPO
on the data request? If you could link to the page that would be very useful.Allan
ALREADY I MET