Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

113
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!