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

437
Views
Getting "Uncaught PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value" error

I'm trying to make a register page, but when I try to register I get the error above. The code:

DB::query('INSERT INTO users VALUES (\'\', first_name, last_name, password, email)', array(':first_name'=>$first_name, ':last_name'=>$last_name, ':password'=>$password, ':email'=>$email));
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The problem seems to be due to this part: \'\'. All you need - to remove it, cause id field is autoincremental.

Just leave:

DB::query('INSERT INTO users VALUES (first_name, last_name, password, email)', array(':first_name'=>$first_name, ':last_name'=>$last_name, ':password'=>$password, ':email'=>$email));

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!