Skip to main content
Topic: AFTER EVENT (Read 1053 times) previous topic - next topic

AFTER EVENT

Hi again...what am i doing wrong?

$db->rawQuery('UPDATE dispositivo SET estadodisp = "ASIGNADO" WHERE id=$modeldata['dispositivo']');

this is in after event

Re: AFTER EVENT

Reply #1
@nyacumo‍ it should be like this
Code: [Select]
$db->rawQuery('UPDATE dispositivo SET estadodisp = "ASIGNADO" WHERE id=$modeldata[dispositivo]');
or like this
Code: [Select]
$db->rawQuery('UPDATE dispositivo SET estadodisp = "ASIGNADO" WHERE id='.$modeldata['dispositivo']);
and not like this
Code: [Select]
$db->rawQuery('UPDATE dispositivo SET estadodisp = "ASIGNADO" WHERE id=$modeldata['dispositivo']');

The two single quotes in the model data variable are the culprit.

 

Re: AFTER EVENT

Reply #2
Awesome!!!! thank you very Much!!!! you are a life saver and a kind person!