Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created September 19, 2019 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/51fa666c08f97c3d9869f033d4f5a195 to your computer and use it in GitHub Desktop.
Save parzibyte/51fa666c08f97c3d9869f033d4f5a195 to your computer and use it in GitHub Desktop.
<?php
public function write($id_de_sesion, $datos_de_sesion)
{
$ultimo_acceso = time();
$sentencia = $this->base_de_datos->prepare("REPLACE INTO sesiones (id, datos, ultimo_acceso) VALUES (?, ?, ?);");
return $sentencia->execute([$id_de_sesion, $datos_de_sesion, $ultimo_acceso]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment