User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » sql question Page [1]  
stephen_tl
All American
611 Posts
user info
edit post

is the word 'Starting' a keyword in sql or php? Also is there a link to keywords out there? Spent to much time trying to debug and saw that changing that one word fixes everything.... I see the word Start is a keyword but not starting itself. I guess you can't have words that look the same?

mysql_query("insert into one(Starting) values('$starting')"); didn't work

mysql_query("insert into one(Beginning) values('$beginning')"); worked...

[Edited on November 5, 2008 at 5:45 PM. Reason : ..]

11/5/2008 5:43:54 PM

Ernie
All American
45943 Posts
user info
edit post

Quote :
"is the word 'Starting' a keyword in sql or php?"


Yes, Starting is a reserved keyword in MySQL

Quote :
"lso is there a link to keywords out there?"


Seriously?

http://www.google.com/search?q=mysql+reserved+words

http://www.google.com/search?q=php+reserved+words

11/5/2008 5:50:36 PM

stephen_tl
All American
611 Posts
user info
edit post

yeah search engines are blocked here. so i still can't see your links....

[Edited on November 5, 2008 at 6:02 PM. Reason : .]

11/5/2008 6:01:41 PM

SexyJesus
Suspended
1338 Posts
user info
edit post

tender your resignation immediately

would not write code under such conditions

11/5/2008 6:40:22 PM

sd2nc
All American
9963 Posts
user info
edit post

deleted

[Edited on November 5, 2008 at 6:50 PM. Reason : s]

11/5/2008 6:43:26 PM

DirtyMonkey
All American
4269 Posts
user info
edit post

OMRTFM!

and: this thread is handy

to answer your question, STARTING is used (in at least this example) in the LOAD DATA statement.

example:


LOAD DATA LOCAL INFILE 'myfile.txt'
INTO TABLE mytable
FIELDS TERMINATED BY ','
LINES STARTING BY '' TERMINATED BY '\n';


if you need to use a reserved word for a column name, enclose it in backticks like so: `Starting`. but you should really choose better column names.

read up: http://dev.mysql.com/doc

[Edited on November 5, 2008 at 8:18 PM. Reason : crazy shitcode!]

11/5/2008 8:14:31 PM

evan
All American
27701 Posts
user info
edit post

yes, STARTING is reserved.


and what sort of fucked up company blocks search engines? i couldn't do my job very well without google.

11/5/2008 8:33:43 PM

Talage
All American
5093 Posts
user info
edit post

i couldn't do my job very well without google.

11/5/2008 9:32:45 PM

DeltaBeta
All American
9417 Posts
user info
edit post

LOL at the OP.

11/5/2008 9:33:25 PM

 Message Boards » Tech Talk » sql question Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.