This is a discussion on "[SOLVED] Mysql Query not working" within the Databases section. This forum, and the thread "[SOLVED] Mysql Query not working are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] Mysql Query not working
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
[SOLVED] Mysql Query not working
Hi, this query:
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 'key = '4'' at line 1 The table definately exists, the field is set to int-1, and is the primary key. I've tried:
Thanks, Nate. |
|
|
|
|||
|
Re: Mysql Query not working
solved, can't call a column key,
Cheers, Nate. |
|
||||
|
Re: Mysql Query not working
Thanks for posting the solution
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
||||
|
Re: [SOLVED] Mysql Query not working
Sure you can name a column 'key'. Your problem is that 'key' is a keyword in MySQL.....
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
|||
|
Re: [SOLVED] Mysql Query not working
If "key" is a keyword in MySQL, that means you can't name you database column as "key"
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Last edited by Monie; Dec 31st, 2007 at 05:52. |
|
||||
|
Re: [SOLVED] Mysql Query not working
OK, you're probably right....
I had the same problem with "id." Almoste tore all of my hair out before I figured that one out.....
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
||||
|
Re: [SOLVED] Mysql Query not working
You're right again.... I meant "index".....
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
|||
|
Re: [SOLVED] Mysql Query not working
I had some nightmare with "no" few years ago!
You can't name a database field as "no" It's a reserved word!
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
||||
|
Re: [SOLVED] Mysql Query not working
There's quite a few apparently:
Quote:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|||
|
Re: [SOLVED] Mysql Query not working
Yeah, "key" is in the list
Does MySQL and MSSQL have different reserved word? "no" is a reserved word in MSSQL, and it's not in the list ^
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
||||
|
Re: [SOLVED] Mysql Query not working
I assume they have a few differences, it is a different language but most of the words are the same.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|||
|
Re: [SOLVED] Mysql Query not working
Found one here! [Reserved Word]
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MYSQL/PHP Query question | andrewlondon | Databases | 1 | Sep 19th, 2007 11:26 |
| MYSQL PHP query class | jhappeal | Databases | 1 | Aug 17th, 2007 01:52 |
| MySQL query query | dangergeek | Databases | 3 | Apr 12th, 2007 12:45 |
| Returning a value from a MYSQL Query? | Kimochi | PHP Forum | 7 | Feb 28th, 2007 20:09 |
| mysql query in a function | Redempt1on | PHP Forum | 6 | May 19th, 2006 01:25 |