Pregunta

echo "</br></br></br>" . $sql;
mysql_query($sql) or die("Entry not added to database.");

is spitting out:

INSERT INTO potentials (id, firstname, lastname, age, email, phone, twitter, timeofday, dayofweek, address, city, state, zip, joindate, parentname, parentnumber) VALUES (null, 'Rick', 'Bross', '14', 'rbross3@gmail.com', '8164896991', '@rick_bross', 'After 5:30PM', 'Weekdays', '1234 Cooper', 'Raymore', 'MO', '64130', '2013-04-09 20:10:06', 'Rick Bross II', '1234123412')Entry not added to database.

Why isn't it being inserted correctly? Can I check if one of the strings isnt fitting into my database column (type type char error or something)?

¿Fue útil?

Solución

mysql_query($sql) or die(mysql_error());

try msql_error() function. It is globally show every error happens with your sql execution

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top