Re: MySQL

by "Boris Petrovic" <boris.petrovic(at)pu.tel.hr>

 Date:  Sun, 14 May 2000 22:32:37 +0200
 To:  <hwg-languages(at)hwg.org>
 References:  barnum
  todo: View Thread, Original
> Can anyone help me with writing to this wretched database?!
>
> I am getting a parse error with the following line:
> mysql_query ("INSERT INTO foobah (item_number, designer, type, price, rrp,
> short_desc, long_desc, sizes, pic_one, pic_two, pic_three, weight)
>                 VALUES ('$item_number', '$designer', '$type', '$price',
> '$rrp', '$short_desc', '$long_desc', '$sizes', '$pic_one', '$pic_two',
> '$pic_three', '$weight')
>              ");
> which is part of a PHP script just designed to take the input of the form
> and add it into foobah, my testing table. I don't see what's wrong with
it,
> I'm at my wits end!! Can anyone make any suggestions?

Sue, "type" is reserved word in MySQL:
http://www.mysql.com/Manual_chapter/manual_Reference.html#Reserved_words

Regards,
---
   Boris Petrovic
   boris.petrovic(at)pu.tel.hr

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA