> > Created a table which will be used to track/process URLs:
> > CREATE TABLE dbURLlist(
> >  ID    SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
> >  AGING TINYINT  UNSIGNED ***** ,
> >  URL   TINYTEXT          NOT NULL,
> >  PRIMARY KEY (ID),
> >  INDEX       (URL (25)))
> >
> > In a PHP script (also prototyped using MySQL-Front) I tried:
> > UPDATE dbURLlist SET AGING=AGING+1
> >
> > When ***** was set to DEFAULT 1 every record updated to 2, as
> > expected; whereas when ***** was set
> > to NULL or DEFAULT 0, it refused to update any of the records present.
>
> NULL: That is to be exptected. Undefined plus 1 is still
> undefined.
>
> 0: Can't reproduce this on my box (v. 3.23.35). It's
> being updated to 1 as it should be.


Carsten,
Thanks for your interest. I'm bewildered (and running v3.23.40-win). Herewith a screen 
dump from my
machine (this time running native MySQL in a DOS box - the NTWS is both client and 
server):

C:\Program Files\mySQL\bin>mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 46 to server version: 3.23.40-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use siteintegrity;
Database changed
mysql> create table dbTest (
    -> id smallint unsigned not null auto_increment,
    -> aging tinyint unsigned null,
    -> url tinytext not null,
    -> primary key (id),
    -> index (url(25)));
Query OK, 0 rows affected (0.69 sec)

mysql> insert dbTest (url) values ("aaaa");
Query OK, 1 row affected (0.51 sec)

mysql> select * from dbTest
    -> ;
+----+-------+------+
| id | aging | url  |
+----+-------+------+
|  1 |  NULL | aaaa |
+----+-------+------+
1 row in set (0.09 sec)

mysql> update dbTest set aging=aging+1;
Query OK, 0 rows affected (0.06 sec)
Rows matched: 1  Changed: 0  Warnings: 0

mysql> select * from dbTest
    -> ;
+----+-------+------+
| id | aging | url  |
+----+-------+------+
|  1 |  NULL | aaaa |
+----+-------+------+
1 row in set (0.00 sec)

Looking forward to your comments,
=dn


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to