|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello,
I am going crazy. I cant find the problem with this statement, But I keep getting the error: 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 'References(ref_key, ref_email, ref_name, applic_id)VALUES('304861584','ref1@amps' at line 1 Here is the query sent by php: Insert into References(ref_key, ref_email, ref_name, applic_id)VALUES('304861584','ref1@ampsoft.com','B ob',58) And a dump of the table structure: CREATE TABLE `References` ( `ref_id` mediumint(10) unsigned NOT NULL auto_increment, `applic_id` mediumint(8) unsigned default NULL, `ref_email` varchar(50) default NULL, `ref_name` varchar(255) default NULL, `ref_key` varchar(10) default NULL, `ref_sent` date default NULL, `ref_received` date default NULL, PRIMARY KEY (`ref_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; Any ? Thanks Mike |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Fri, 28 Dec 2007 16:50:11 -0800 (PST), AMP wrote:
> Hello, > I am going crazy. I cant find the problem with this statement, But I > keep getting the error: > 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 'References(ref_key, ref_email, ref_name, > applic_id)VALUES('304861584','ref1@amps' at line 1 > > Here is the query sent by php: > Insert into References(ref_key, ref_email, ref_name, > applic_id)VALUES('304861584','ref1@ampsoft.com','B ob',58) > > And a dump of the table structure: > > CREATE TABLE `References` ( > `ref_id` mediumint(10) unsigned NOT NULL auto_increment, > `applic_id` mediumint(8) unsigned default NULL, > `ref_email` varchar(50) default NULL, > `ref_name` varchar(255) default NULL, > `ref_key` varchar(10) default NULL, > `ref_sent` date default NULL, > `ref_received` date default NULL, > PRIMARY KEY (`ref_id`) > ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; "References" is a reserved work in mysql. either change your table name or backtick it like the table structure shows. -- 42. When I capture the hero, I will make sure I also get his dog, monkey, ferret, or whatever sickeningly cute little animal capable of untying ropes and filching keys happens to follow him around. --Peter Anspach's list of things to do as an Evil Overlord |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Dec 28, 8:23pm, "Peter H. Coffin" <hell...@ninehells.com> wrote:
> On Fri, 28 Dec 2007 16:50:11 -0800 (PST), AMP wrote: > > Hello, > > I am going crazy. I cant find the problem with this statement, But I > > keep getting the error: > > 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 'References(ref_key, ref_email, ref_name, > > applic_id)VALUES('304861584','ref1@amps' at line 1 > > > Here is the query sent by php: > > Insert into References(ref_key, ref_email, ref_name, > > applic_id)VALUES('304861584','r...@ampsoft.com','B ob',58) > > > And a dump of the table structure: > > > CREATE TABLE `References` ( > > `ref_id` mediumint(10) unsigned NOT NULL auto_increment, > > `applic_id` mediumint(8) unsigned default NULL, > > `ref_email` varchar(50) default NULL, > > `ref_name` varchar(255) default NULL, > > `ref_key` varchar(10) default NULL, > > `ref_sent` date default NULL, > > `ref_received` date default NULL, > > PRIMARY KEY (`ref_id`) > > ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; > > "References" is a reserved work in mysql. either change your table name > or backtick it like the table structure shows. > > -- > 42. When I capture the hero, I will make sure I also get his dog, monkey, > ferret, or whatever sickeningly cute little animal capable of untying > ropes and filching keys happens to follow him around. > --Peter Anspach's list of things to do as an Evil Overlord- Hide quoted text - > > - Show quoted text - Great, I never thought to check! Is there a method of getting better error messages? Thanks Mike |
|
![]() |
| Outils de la discussion | |
|
|