Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Databasing
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 07-03-2009, 11:29 PM
  #1
Sawtooth500
Lord (Level 16)
 
Sawtooth500's Avatar
 
Join Date: Nov 2007
Location: Chicago, IL. USA
Posts: 546
iTrader: (0)
Sawtooth500 is on a distinguished road
Is MySQL on crack?



So the above picture is directly from phpMyAdmin. The folllowing queries were done through phpMyAdmin:

insert into property_table (display) values ("trial value")
This works fine.

insert into property_table (condition) values ("trial value")
This gives an error.

Now if you look at picture, fields display and condition are freaking identical!!! Why does that work for display but not work for condition???
__________________
-Taras Hryniw

http://www.waltonstreetwebdesign.com
Sawtooth500 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 07-04-2009, 12:06 AM
  #2
Sawtooth500
Lord (Level 16)
 
Sawtooth500's Avatar
 
Join Date: Nov 2007
Location: Chicago, IL. USA
Posts: 546
iTrader: (0)
Sawtooth500 is on a distinguished road
Miraculously, I just rename field "condition" to "condition2" and the thing works... is condition a protected word in mysql or something?
__________________
-Taras Hryniw

http://www.waltonstreetwebdesign.com
Sawtooth500 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 07-04-2009, 07:17 AM
  #3
Jeremy Ross
Novice (Level 1)
 
Join Date: Oct 2002
Posts: 5
iTrader: (0)
Jeremy Ross is on a distinguished road
Try wraping the word condition in back quotes within the query like this:

insert into property_table (`condition`) values ("trial value")
Jeremy Ross is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 07-04-2009, 07:20 AM
  #4
Sawtooth500
Lord (Level 16)
 
Sawtooth500's Avatar
 
Join Date: Nov 2007
Location: Chicago, IL. USA
Posts: 546
iTrader: (0)
Sawtooth500 is on a distinguished road
What's the point of wrapping certain words in mysql queries with the `something here` vs just something here?
__________________
-Taras Hryniw

http://www.waltonstreetwebdesign.com
Sawtooth500 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 07-04-2009, 08:12 AM
  #5
¥åßßå
Blonde Bimbo
 
¥åßßå's Avatar
 
Join Date: Jul 2004
Posts: 2,197
iTrader: (0)
¥åßßå is a name known to all¥åßßå is a name known to all¥åßßå is a name known to all¥åßßå is a name known to all¥åßßå is a name known to all¥åßßå is a name known to all
mysql : Reserved words

¥
__________________
I may have opened the door, but you entered of your own free will

¥åßßå is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 07-04-2009, 02:39 PM
  #6
Sawtooth500
Lord (Level 16)
 
Sawtooth500's Avatar
 
Join Date: Nov 2007
Location: Chicago, IL. USA
Posts: 546
iTrader: (0)
Sawtooth500 is on a distinguished road
Thank you.
__________________
-Taras Hryniw

http://www.waltonstreetwebdesign.com
Sawtooth500 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 07-09-2009, 01:46 AM
  #7
JerryDucharme
Novice (Level 1)
 
Join Date: Jul 2009
Posts: 5
iTrader: (0)
JerryDucharme is an unknown quantity at this point
I know the bug is resolved, but be careful with the My SQL syntax. " " and ' ' are not exactly the same thing and if you have more than one word, it might not use the whole name, just the first word (then results you in an error msg...).
JerryDucharme is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 05:47 PM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.