editor and php, pulling content from different table from id in the cell of the current table

editor and php, pulling content from different table from id in the cell of the current table

javismilesjavismiles Posts: 205Questions: 38Answers: 3

good day,
im using editor with php, and my question is, if the content of a cell should come from a different table, how do I make that?
say the content of a cell has an id that has to be used to pull the description that is on a different table, how do I connect that in the php side of things? thank u so much

php..............:

$findit=array_keys(array_filter($dbArray, function($item){return $item['table'] === $GLOBALS['etype'];}));
$pos=$findit[0];
$fields=$dbArray[$pos]['fields'];
$id=$dbArray[$pos]['id'];
$tid=$dbArray[$pos]['tid'];

$keys = array_keys($fields);

$editor = Editor::inst( $db, $tid,$id );

for($i = 0; $i < count($fields); $i++) {$editor->fields(Field::inst($fields[$i]['i']));}

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

This question has an accepted answers - jump to answer

Answers

  • javismilesjavismiles Posts: 205Questions: 38Answers: 3
    Answer ✓

    how do i close a question?
    i just solved this, I want to close it

  • allanallan Posts: 63,506Questions: 1Answers: 10,471 Site admin

    I've marked your own reply as the answer.

    Allan

This discussion has been closed.