I’m wanting to implement a particular functionality in a MySQLi extension that I’m creating, but I don’t want to do so if it’s already there, or mostly there. I’ve thoroughly read over the documentation, and I’m just not sure if this or similar functionality is built-in; anyone know?
$db = new mysqli;
$sql = 'SELECT whatever...';
$obj = $db->fetchUpdate($sql);
// overwrite previous values
$obj->result['first'] = 'John';
$obj->result['last'] = 'Smith';
$obj->update(); // save to db
Again, I can put together a light wrapper extension that does this very thing; I just want to make sure it’s not already part of the mysqli base methods and I’ve simply overlooked it in the documentation. Thanks for the guidance!
It’s not implemented in the MySQLi, that’s why there’s so many ORM’s out there 🙂