method getPrevUpdate documentation in bbn\Appui\History

function(string $table, string $id, $from_when, $column = NULL) { if ( bbn\Str::checkName($table) && ($date = self::validDate($from_when)) && ($dbc = self::_get_database()) && ($db = self::_get_db()) ){ $tab = $db->escape(self::$table); $line = $db->escape('uid'); $operation = $db->escape('opr'); $chrono = $db->escape('tst'); if ( $column ){ $where = $db->escape('col'). ' = UNHEX("'.$db->escapeValue( bbn\Str::isUid($column) ? $column : $dbc->columnId($column, $table) ).'")'; } else{ $where = self::_get_table_where($table); } $sql = <<< MYSQL SELECT * FROM $tab WHERE $line = ? AND ($where) AND $operation LIKE 'UPDATE' AND $chrono < ? ORDER BY $chrono DESC LIMIT 1 MYSQL; return $db->getRow($sql, hex2bin($id), $date); } return null; }

BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.