English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

New member registration
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 ' 1, 0, 0, 0, '2007-01-19 22:12:42', 0, '2007-01-19 22:12:42', 'n

The mysql is on yahoo web services.

I know it a SQL Syntax error just dont know if its the database or the PHP that sends it the info.

Any suggestions recieved with thanks

2007-01-19 10:53:27 · 2 answers · asked by Microanalyst 2 in Computers & Internet Programming & Design

2 answers

In PHP write your database statements with the "die" function at the end and that will give you the right error. For example:
$x = mysql_query($sql) or die("Error: SQL statement is incorrect");

or

mysql_db_connect("user","pw","mysql") or die("My error message: Cannot connect to the database");

This way you know for sure if its the PHP or database.
PHP errors usually include the line number where the error ocured.

2007-01-19 14:37:42 · answer #1 · answered by ◄|| G ||► 6 · 0 0

post the code and the db layout.........not enough info here. Could be the the sql statement or the field type is wrong, or both

2007-01-19 11:08:17 · answer #2 · answered by Jeffrey F 6 · 0 0

fedest.com, questions and answers