List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:March 31 1999 1:42pm
Subject:Re: Start Slips with "50000"?
View as plain text  
Charles Kirby wrote:
> 
> Hi folks... maybe someone can help with this one.
> 
> I want to start my Slip numbering with 50,000 instead of 1, and I thought
> I was being smart by just doing UPDATE slips SET sid='50000' where
> sid='1', but this doesn't work!  sid is INT(11); I tried sid='500' but
> this was no good either (in either case, browsing gives "no tickets
> defined."
> 
> Any ideas anyone?
> 
> Thanks!
> ck

Hi Charles

Sorry, but I couldn't reproduce your problem.
This obviously works for me:
mysql> CREATE TABLE slips (sid INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY);
Query OK, 0 rows affected (0.22 sec)

mysql> INSERT INTO slips VALUES(1);
Query OK, 1 row affected (0.01 sec)

mysql> UPDATE slips SET sid='50000' WHERE sid='1';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> INSERT INTO slips VALUES (NULL);
Query OK, 1 row affected (0.01 sec)

mysql> SELECT * FROM slips;
+-------+
| sid   |
+-------+
| 50000 |
| 50001 |
+-------+
2 rows in set (0.03 sec)

Tschau
Christian

Thread
Start Slips with "50000"?Charles Kirby30 Mar
  • Re: Start Slips with "50000"?Christian Mack31 Mar
    • Re: Start Slips with "50000"?Charles Kirby31 Mar