Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

181
Vistas
How to pass Date-Function via SQL-Mapper in fat-free-framwork?

I am using fat-free-framwork to edit my user-table and try to update a date-field with:

$user = new DB\SQL\Mapper($db,TBL_USER);
$user->load('userID = 12');
$user->username = 'newUsername';
$user->datChanged = 'NOW()';
&user->update();

It changes the field 'username' proper but wont change the datetime-field 'datChanged' as the mapper puts the NOW() into quotes.

Any idea how to call the date-functions in the mapper?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

It's not possible at the moment, because the mapper heavily uses prepared statements and you cannot bind functions to placeholders, because the underlaying PDO engine is stringifying these within the query preparation.

You could use this instead:

$user->datChaned = date('Y-m-d H:i:s');
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda