SearchSearch   

What's Wrong With This??????

 
   Webmaster Forums (Home) -> PHP MySQL RSS
Next:  skip-grant-tables + phpmyadmin  
Author Message
PHPBABY3

External


Since: Mar 08, 2008
Posts: 6



(Msg. 1) Posted: Mon Dec 01, 2008 8:57 am
Post subject: What's Wrong With This??????
Archived from groups: alt>php>sql (more info?)

Error
SQL query:
INSERT INTO FORCE SET USERNUM = "2",
BUYSELL = "S",
PURCH = "5"
MySQL said:
#1064 - 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 'FORCE set USERNUM="2",BUYSELL="S",PURCH="5"' at line 1

USERNUM int(11)
BUYSELL char(1) latin1_swedish_ci
PURCH int(11)
Back to top
Captain Paralytic

External


Since: Apr 24, 2007
Posts: 49



(Msg. 2) Posted: Mon Dec 01, 2008 11:35 am
Post subject: Re: What's Wrong With This??????
Archived from groups: per prev. post (more info?)

On 1 Dec, 18:11, "J.O. Aho" <u... DeleteThis @example.net> wrote:
> PHPBABY3 wrote:
> > Error
> > SQL query:
> > INSERT INTO FORCE SET USERNUM = "2",
> > BUYSELL = "S",
> > PURCH = "5"
> > MySQL said:
> > #1064 - 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 'FORCE set USERNUM="2",BUYSELL="S",PURCH="5"' at line 1
>
> > USERNUM  int(11)
> > BUYSELL char(1) latin1_swedish_ci
> > PURCH int(11)
>
> INSERT INTO `FORCE`(USERNUM,BUYSELL, PURCH) VALUES(2,'S',5)
>
> Hints, use lower case names for your tables and columns.
> Use better names for your tables and columns, don't use reserved words as
> table or column names.
> For id numbers, use UNSIGNED, this will give you double up the amount of users
> you can have.
>
> --
>
>   //Aho

Or:
INSERT INTO `FORCE` SET USERNUM = "2",
BUYSELL = "S",
PURCH = "5
Back to top
J.O. Aho

External


Since: May 31, 2006
Posts: 2034



(Msg. 3) Posted: Mon Dec 01, 2008 7:11 pm
Post subject: Re: What's Wrong With This??????
Archived from groups: per prev. post (more info?)

PHPBABY3 wrote:
> Error
> SQL query:
> INSERT INTO FORCE SET USERNUM = "2",
> BUYSELL = "S",
> PURCH = "5"
> MySQL said:
> #1064 - 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 'FORCE set USERNUM="2",BUYSELL="S",PURCH="5"' at line 1
>
> USERNUM int(11)
> BUYSELL char(1) latin1_swedish_ci
> PURCH int(11)

INSERT INTO `FORCE`(USERNUM,BUYSELL, PURCH) VALUES(2,'S',5)

Hints, use lower case names for your tables and columns.
Use better names for your tables and columns, don't use reserved words as
table or column names.
For id numbers, use UNSIGNED, this will give you double up the amount of users
you can have.

--

//Aho
Back to top
Display posts from previous:   
       Webmaster Forums (Home) -> PHP MySQL
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum