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

115
Vistas
Adding named constrained mysqli with a variable reference table name

I am trying to create a table with a named constrained, however it is not being created. I tracked the problem to be in this line:

CONSTRAINT $fk_post_id_lik FOREIGN KEY(post_id) REFERENCES $posts (global_id)

where $posts is the name of a table created before. Does anyone know what could be wrong?

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

0

Turns out the table $posts was being created AFTER this one, for which, when this table was being created, it did not find the required table. Silly mistake.

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