Random data saved on dropdown
Random data saved on dropdown
Dear Allan,
I have been able to create a dropdown on each one of my rows. The idea is to save the value of the selected choice of the dropdown in the table (this value is the iduser) and it works well. But many times it changes the user's lastname (no the firstname) apart from saving the id. I don't know what to do.
The other issue is that I'm not able to put two condition in the where clause of the dropdown. I have tried to put this way but it take just the last value, not both: array('idconfig_users'=>'90','idconfig_users'=>'110')
Could you please guide me?
This is the server side code:
Field::inst( 'avclasses.iduser' )
->options( function () use ( $db ) {
$userList = $db->select( 'avusers', 'id,firstname, lastname, lastname2',array('idconfig_users'=>'90'), ' lastname ASC' );
$out = array();
while ( $row = $userList->fetch() ) {
$out[] = array(
"value" => $row['id'],
"label" => $row['firstname'].' '.$row['lastname'].' '.$row['lastname2']
);
}
return $out;
} ),
Thank you!
Answers
Can you link to the page so I can take a look and see why this might be happening please.
Allan
http://desarrollo.textonline-intranet.com/school/datatables_forum.php
In this page you will see the dropdown of the TUTOR and it appears with lastname but when you select one it deletes or changes them.
Could you tell how to include more than one where clause (as an array) in this dropdown?
Thank you in advance.