Skip to main content
se añadieron 13 caracteres en el cuerpo
Origen Enlace
cnbandicoot
  • 2.8k
  • 11
  • 24
$sql = sprintf("INSERT INTO users (firstname, lastname, email, phone, state, dob, rules, pepsico_news) VALUES (%s, %s, %s, %s, %s, %s, %u, %s)", $fname, $lname, $email, $phone, $state, $dob, $rules, $pepsico_news);

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@gmail.com, 55555555555, NY, 01.10.89, 0, no)' at line 1

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
near '@gmail.com, 55555555555, NY, 01.10.89, 0, no)' at line 1

He tratado de encontrar el error pero no lo encuentro, seguro es algo de sintaxis pero no logro encontrarlo.

$sql = sprintf("INSERT INTO users (firstname, lastname, email, phone, state, dob, rules, pepsico_news) VALUES (%s, %s, %s, %s, %s, %s, %u, %s)", $fname, $lname, $email, $phone, $state, $dob, $rules, $pepsico_news);

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@gmail.com, 55555555555, NY, 01.10.89, 0, no)' at line 1

He tratado de encontrar el error pero no lo encuentro, seguro es algo de sintaxis pero no logro encontrarlo.

$sql = sprintf("INSERT INTO users (firstname, lastname, email, phone, state, dob, rules, pepsico_news) VALUES (%s, %s, %s, %s, %s, %s, %u, %s)", $fname, $lname, $email, $phone, $state, $dob, $rules, $pepsico_news);
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
near '@gmail.com, 55555555555, NY, 01.10.89, 0, no)' at line 1

He tratado de encontrar el error pero no lo encuentro, seguro es algo de sintaxis pero no logro encontrarlo.

Origen Enlace

Cual es el error en este sprintf()?

$sql = sprintf("INSERT INTO users (firstname, lastname, email, phone, state, dob, rules, pepsico_news) VALUES (%s, %s, %s, %s, %s, %s, %u, %s)", $fname, $lname, $email, $phone, $state, $dob, $rules, $pepsico_news);

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@gmail.com, 55555555555, NY, 01.10.89, 0, no)' at line 1

He tratado de encontrar el error pero no lo encuentro, seguro es algo de sintaxis pero no logro encontrarlo.