![]() |
| |||
| Hi All; I have a weird problem that occured when I was checking compatability of 5.0 for my application. I have a working application in 4.1 and I was going to upgrade. My Select statements don't work I name more than 6 columns thought so this statment: "SELECT ItemNum, descript_1, descript_3, descript_2, width , price, repeat FROM apple_price ORDER BY sort, descript_1" gives this error: "ERROR: 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 'FROM apple_price ORDER BY sort, descript_1' at line 1" If I remove 1 column from select it works. If I use "Select * From" it works. I can't figure out why. What am I missing? Thanks Willie |
| |||
| On Fri, 10 Aug 2007 20:32:30 +0200, Willie <willie@pdfsystems.com> wrote: > Hi All; > > I have a weird problem that occured when I was checking compatability of > 5.0 > for my application. I have a working application in 4.1 and I was going > to > upgrade. My Select statements don't work I name more than 6 columns > thought > so this statment: > "SELECT ItemNum, descript_1, descript_3, descript_2, width , price, > repeat > FROM apple_price ORDER BY sort, descript_1" > gives this error: > "ERROR: 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 > 'FROM apple_price ORDER BY sort, descript_1' at line 1" > If I remove 1 column from select it works. If I use "Select * From" it > works. > > I can't figure out why. What am I missing? 'repeat' is a reserved word (it's a function). Either use `repeat` (with backticks) or rename the column. -- Rik Wasmus |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |