I have a simple question,
I have table:
| val | type | status |
|-----|------|--------|
| 90 | 1 | a |
i would like to have a stored proc that able to update above table based on variable given in input param.
for example, maybe in PHP i have array:
$data = ['val' => 80, 'status' => 'c']
i would like to send that data to mysql stored proc, so it'll knows that it need to update val to 80 and status into 'c'
or another example:
$data = ['type' => 1, 'nothing' => NULL, 'status' => NULL, 'val' => 77]
then it will update type to 1, status to null, val to 77 and ignore 'nothing'
*the $data input, shall not hardcoded in input param in Stored Proc :D
is this can be done 'simply' ?
Thanks!