"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,attach,ct,uniq,notify,replyto)
> values(null,'jmckeon','1','test','test
> test',unix_timestamp(now()),'"[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]>','Medium','Open',unix_timestamp(now()),'Jeff
> McKeon','Jeff McKeon','','','ks5hslajdfasd','1','[EMAIL PROTECTED]')
> 
> The error: 
> 
> You have an error in your SQL syntax near
> 'from,department,subject,body,lastaction,lastpost,priority,status,create
> d,fromnam' at line 1
> 
> I suspect it doesn't like the fact that I have a field named "from" but
> I KNOW it's possible to write to this table and that field, I just can't
> figure out the correct syntax to get it to accept the fieldname "from".
> 
> Thanks,
> 
> Jeff
> 
> 

You have to use backticks: `from`
http://dev.mysql.com/doc/refman/4.1/en/legal-names.html

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Reply via email to