You can use the back quote(`) to escape the field name. It's the ~
key on the keyboard.
tickets(`from`,`department`,...
If you type SHOW CREATE TABLE tickets, you'll see mysql escapes all
the field names to avoid reserve word conflicts.
On Nov 29, 2005, at 2:14 PM, Rhino wrote:
- Ori
- Original Message -
From: "Jeff" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, November 29, 2005 11:42 AM
Subject: Insert query problem
All,
I can't get this query to run, it keeps compaining that there is a
problem:
The Query:
insert into
tickets(id,from,department,subject,body,lastac
You can use backticks ( ` ) to escape the names:
INSERT INTO `tickets` ( `id` , `from` , `departement` .
hth,
melanie
From: "Jeff" <[EMAIL PROTECTED]>
To:
Subject: Insert query problem
Date: Tue, 29 Nov 2005 11:42:34 -0500
All,
I can't get this query to run, it keeps compaining that the
Many Many wrong SQL syntax error check your symbol (') becareful it 'very
important .
You can do that.
Cheer!!
From: "Jeff" <[EMAIL PROTECTED]>
To:
Subject: Insert query problem
Date: Tue, 29 Nov 2005 11:42:34 -0500
All,
I can't get this query to run, it keeps compaining that there is a
Jeff wrote:
tickets(id,from,department,subject,body,lastaction,lastpost,priority,sta
tus,created,fromname,lastpostname,attach,ct,uniq,notify,replyto)
values(null,'jmckeon','1','test','test
test',unix_timestamp(now()),'"[EMAIL PROTECTED]"
<[EMAIL PROTECTED]>','Medium','Open',unix_timestamp(now())
Nevermind, found that usig `from` works.
Jeff
> -Original Message-
> From: Jeff [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 29, 2005 11:43
> To: mysql@lists.mysql.com
> Subject: Insert query problem
>
>
> All,
>
> I can't get this query to run, it keeps compaining that there i
"Jeff" <[EMAIL PROTECTED]> wrote on 11/29/2005 11:42:34 AM:
> All,
>
> I can't get this query to run, it keeps compaining that there is a
> problem:
>
> The Query:
>
> insert into
> tickets(id,from,department,subject,body,lastaction,lastpost,priority,sta
> tus,created,fromname,lastpostname,atta