php-general Digest 27 Jun 2013 21:16:30 -0000 Issue 8280

2013-06-27 Thread php-general-digest-help

php-general Digest 27 Jun 2013 21:16:30 - Issue 8280

Topics (messages 321496 through 321514):

Re: Reseting the auto-increment number in a MySQL database.
321496 by: Samuel Lopes Grigolato
321497 by: Stuart Dallas
321498 by: Tedd Sperling
321499 by: Jim Giner
321501 by: Tedd Sperling
321509 by: Matijn Woudt
321510 by: Jim Lucas
321512 by: Tedd Sperling

Last Record INSERT
321500 by: Tedd Sperling
321502 by: Tedd Sperling
321503 by: Stuart Dallas
321504 by: Tedd Sperling
321505 by: Stuart Dallas
321506 by: Samuel Lopes Grigolato
321507 by: Dan Munro
321508 by: Carsten Jensen
321511 by: Tedd Sperling
321513 by: Curtis Maurand

Migration of applications to PHP 5.4
321514 by: Forum

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---
You can try this: *ALTER TABLE tbl AUTO_INCREMENT = 100;*
*
*
*Source: *http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html

(never did it myself, though)


On Wed, Jun 26, 2013 at 2:07 PM, Tedd Sperling t...@sperling.com wrote:

 Hi gang:

 I have a client where their next auto-increment number just jumped from
 2300 to 10 for reasons not understood. They want it set back.

 Options such as dropping the primary key and rebuilding the index is NOT
 possible -- this is a relational table thing.

 So, is there a way (programmatically) to set the next number in an
 auto-increment?

 Something like:

 alter table abc auto_increment = 2301;

 Any ideas of why this happened?

 Cheers,


 tedd

 _
 t...@sperling.com
 http://sperling.com


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


---End Message---
---BeginMessage---
On Wednesday, 26 June 2013 at 18:07, Tedd Sperling wrote:
 Hi gang:
 
 I have a client where their next auto-increment number just jumped from 2300 
 to 10 for reasons not understood. They want it set back.
 
 Options such as dropping the primary key and rebuilding the index is NOT 
 possible -- this is a relational table thing.
 
 So, is there a way (programmatically) to set the next number in an 
 auto-increment?
 
 Something like:
 
 alter table abc auto_increment = 2301;
 

ALTER TABLE tbl AUTO_INCREMENT = 2301;

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/



---End Message---
---BeginMessage---
On Jun 26, 2013, at 1:13 PM, Stuart Dallas stu...@3ft9.com wrote:

 On Wednesday, 26 June 2013 at 18:07, Tedd Sperling wrote:
 Hi gang:
 
 I have a client where their next auto-increment number just jumped from 2300 
 to 10 for reasons not understood. They want it set back.
 
 Options such as dropping the primary key and rebuilding the index is NOT 
 possible -- this is a relational table thing.
 
 So, is there a way (programmatically) to set the next number in an 
 auto-increment?
 
 Something like:
 
 alter table abc auto_increment = 2301;
 
 
 ALTER TABLE tbl AUTO_INCREMENT = 2301;
 
 -Stuart

Thanks -- I needed confirmation on that.

It is something that i don't want to do.

Cheers,

tedd

_
t...@sperling.com
http://sperling.com
---End Message---
---BeginMessage---

On 6/26/2013 1:30 PM, Tedd Sperling wrote:

On Jun 26, 2013, at 1:13 PM, Stuart Dallas stu...@3ft9.com wrote:


On Wednesday, 26 June 2013 at 18:07, Tedd Sperling wrote:

Hi gang:

I have a client where their next auto-increment number just jumped from 2300 to 
10 for reasons not understood. They want it set back.

Options such as dropping the primary key and rebuilding the index is NOT 
possible -- this is a relational table thing.

So, is there a way (programmatically) to set the next number in an 
auto-increment?

Something like:

alter table abc auto_increment = 2301;



ALTER TABLE tbl AUTO_INCREMENT = 2301;

-Stuart


Thanks -- I needed confirmation on that.

It is something that i don't want to do.

Cheers,

tedd

_
t...@sperling.com
http://sperling.com

But more importantly - don't you need to figure out why it happened?? 
As well as correcting any inserts with the bogus id?
---End Message---
---BeginMessage---
On Jun 26, 2013, at 1:32 PM, Jim Giner jim.gi...@albanyhandball.com wrote:

 But more importantly - don't you need to figure out why it happened?? As 
 well as correcting any inserts with the bogus id?


Yes, I would like to know -- I'm open for suggestions.

Cheers,

tedd

_
tedd.sperl...@gmail.com
http://sperling.com



---End Message---
---BeginMessage---
On Wed, Jun 26, 2013 at 7:35 PM, Tedd Sperling tedd.sperl...@gmail.comwrote:

 On Jun 26, 2013, 

[PHP] Migration of applications to PHP 5.4

2013-06-27 Thread Forum

Hello,

i recently migrated my webserver from Debian Lenny (with PHP 4.x) to Wheezy 
with PHP 5.4.

Some applications like mediawiki could be updated and they are running fine.

But there are some old and beloved applications that run any more.
A good example is PHPmyedit 5.7.1 http://www.phpmyedit.org/
The first page with data is displayed but all links and buttons are dead!

There is no error produced by PHP and i have no idea why it is not working?
I'm have only basic knowledge with PHP and would be glad to have some tips how 
to debug things without error.

My hope is that this migration problem is known and can be fixed simply?

Thanks
Karsten


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Reseting the auto-increment number in a MySQL database.

2013-06-27 Thread adriano


holes in sequence of auto increment happen using transaction for insert 
new record but you don't commit transaction itself

it seems that the autoincrement is incremented anyway
at least this is my case.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Reseting the auto-increment number in a MySQL database.

2013-06-27 Thread Paul M Foster
On Thu, Jun 27, 2013 at 11:47:28PM +0200, adriano wrote:

 
 holes in sequence of auto increment happen using transaction for
 insert new record but you don't commit transaction itself
 it seems that the autoincrement is incremented anyway
 at least this is my case.

I think what Tedd was referring to was something else. The hole was
quite large. I've seen this behavior myself, in PostgreSQL. From one
transaction to the next, there were over 10,000 skipped numbers, and
only me and my wife on the system. Some sort of bug, like a spinlock
that wasn't interrupted the way it should have been. I remember the
system taking forever to calm down before it gave the next transaction a
number way forward of the last one. I waited in front of my browser for
quite some time. But I couldn't explain why.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php