Re: Automatically updating Timestamp Column with DBD:MYSQL

Rich Allen <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
are your updates actually working?

this works ...

test> create table x1 (
     -> t timestamp(14),
     -> val varchar(16) );
Query OK, 0 rows affected (0.19 sec)

test> select * from x1;
Empty set (0.03 sec)

test> insert into x1 values(now(), 'hcir');
Query OK, 1 row affected (0.11 sec)

test> select * from x1;
+---------------------+------+
| t                   | val  |
+---------------------+------+
| 2005-04-13 15:49:05 | hcir |
+---------------------+------+
1 row in set (0.00 sec)

test> update x1 set val='rich' where val='hcir';
Query OK, 1 row affected (0.05 sec)
Rows matched: 1  Changed: 1  Warnings: 0

test> select * from x1;
+---------------------+------+
| t                   | val  |
+---------------------+------+
| 2005-04-13 15:49:25 | rich |
+---------------------+------+
1 row in set (0.00 sec)

test>

On Apr 13, 2005, at 3:00 PM, zzapper wrote:

> Hi,
> It's late (at least here in my part of the universe) but I'm inserting 
> records into a mysql database
> with Perl DBI DBD:MySQL and was expecting my first & only timestamp 
> field to be updated without me
> needing to specifically mention it in the insert clause, but the field 
> is obstinately remaining null
>
> Any Ideas?
>
>
>
> -- 
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe:    http://lists.mysql.com/[email protected]
>
>

- hcir


-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.