DBI or Mysql UPDATE error?

DBI or Mysql UPDATE error?

am 18.08.2004 15:37:39 von Neil Watson

I'm having an issue with a statement executed through perl. I'm not
sure where the problem lies:

Table:
mysql> describe hardware;
+-------------+------------------+------+-----+------------- ---+----------------+
| Field | Type | Null | Key | Default | Extra
+-------------+------------------+------+-----+------------- ---+----------------+
| hid | int(10) unsigned | | PRI | NULL | auto_increment |
| changed | timestamp(14) | YES | | NULL |
| created | timestamp(14) | YES | | 00000000000000 |
| received | date | YES | | NULL |
| description | text | YES | | NULL |
| model | varchar(35) | YES | | NULL |
| serial | varchar(35) | YES | | NULL |
| poid | int(10) unsigned | YES | | NULL |
| hwtid | int(10) unsigned | YES | | NULL |
| uid | int(10) unsigned | YES | | NULL |
+-------------+------------------+------+-----+------------- ---+----------------+
10 rows in set (0.01 sec)

Statement:
#update if hid is specified
if ($hid != 0){
$statement = "UPDATE hardware SET
description='$description',
model='$model',
hwtid='$hwtid',
serial='$serial',
poid='$poid',
uid='$uid'
WHERE hid='$hid';";

Error:
error: dbh2 = Apache::DBI::db=HASH(0x87011f0) Couldn't execute
statement: UPDATE hardware SET
description='Workstation',
model='',
hwtid='1',
serial='AD750-1489164',
poid='',
uid=''
WHERE hid=2; Unknown column 'model' in 'field list' at
/var/www/itiv/htdocs/admin/comp/insert.mas line 667.

Using Mysql server 4.0.20, DBI 1.38, Perl 5.8.2, Apache DBI 0.92 and
Mason 1.20.

--
Neil Watson | Gentoo Linux
Network Administrator | Uptime 78 days
http://watson-wilson.ca | 2.6.5 AMD Athlon(tm) MP 2000+ x 2

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org