Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

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

 
   Database Help (Home) -> PHP SQL RSS
Next:  email Problems  
Author Message
PHPBABY3

External


Since: Mar 08, 2008
Posts: 8



(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)

 >> Stay informed about: What's Wrong With This?????? 
Back to top
Login to vote
Captain Paralytic

External


Since: Jan 14, 2008
Posts: 245



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

On 1 Dec, 18:11, "J.O. Aho" 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

 >> Stay informed about: What's Wrong With This?????? 
Back to top
Login to vote
J.O. Aho

External


Since: Dec 01, 2003
Posts: 190



(Msg. 3) Posted: Mon Dec 01, 2008 1:25 pm
Post subject: Re: What's Wrong With This?????? [Login to view extended thread Info.]
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
 >> Stay informed about: What's Wrong With This?????? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
PHPtriad v2.2.1 removal - When I fist started using apache/php/mysql I used phptriad [a wonderful piece of kit] to get me up and running. I've used this ever since. I'm think inow of 'upgrading' to laters versions of all three applications, and have found various tutorials/Ho...

MySQL regular expression to match a imploded item - Hello I need to use MySQL's REGEXP (POSIX compliant) to search registries where one field is an imploded set of integer values separated with pipes "|". I need to match one of these imploded values directly on a sql select. $sql = "SELECT...

Weird mysql_connect problem - Hello. My mysql_connect just started to give me following error today, Fatal error: Call to undefined function: mysql_connect() in ..../database_functions/db_functions.inc.php on line 11. So it seems that my php no longer finds php-mysql module...

MySQL - question about displaying data - I am working an some pages that have database content on them. I'm sorry that I don't have any versions of it online yet, but it isn't hard to explain. The site lists restaurants with contact information. All of the information is kept in a MySQL..

How can i Optimize sql Query ? - Hi, I'd like to optimize this query: Code: SELECT * FROM `links` WHERE active = "1" AND mainweight != 0 ORDER BY Rand()*(1/mainweight) LIMIT 5 I have a database of links wich has 3 000 rows. I'd like to select weighted random links from ...
   Database Help (Home) -> PHP SQL All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can 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



[ Contact us | Terms of Service/Privacy Policy ]