Jeff S Wheeler wrote:
> [This is an email copy of a Usenet post to "mailing.database.mysql"]
>
> Just insert a row with the initial value you want minus one, and then
> delete it. That will make the table do what you want.
>
> mysql> INSERT INTO Orders VALUES (-1, "", NOW(), -1, 0000125478);
> Query OK, 1 row affected (0.03 sec)
>
> mysql> DELETE FROM Orders WHERE OrderNumber=125478;
> Query OK, 1 row affected (0.02 sec)
>
> mysql> INSERT INTO Orders VALUES (-1, "", NOW(), -1, 0);
> Query OK, 1 row affected (0.02 sec)
>
> mysql> SELECT LAST_INSERT_ID();
> +------------------+
> | last_insert_id() |
> +------------------+
> | 125479 |
> +------------------+
> 1 row in set (0.02 sec)
You did not supplied us any information about your table structure. If
this is an column named "OrderNumber" where you insert -1 then
everything seems OK to me. Please descibe where you can see problem and
what is your table structure.
--
For technical support contracts, goto https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Tonu Samuel <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Security Administrator
/_/ /_/\_, /___/\___\_\___/ Hong Kong, China
<___/ www.mysql.com
---------------------------------------------------------------------
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