On Tue, November 8, 2005 7:37 am, Rahul S. Johari wrote:
> Is there a way to fix ID sequence in a MySQL table using PHP?
> Basically I have some tables with a lot of records, 1000 to 5000.
> ID¹ is
> the Primary Key column in these tables, and at the time the code was
> originally written, there
Thanks!
On 11/8/05 11:49 AM, "Georgi Ivanov" <[EMAIL PROTECTED]> wrote:
> You van do this :
> 1.Create new table with exactly the same structure as orig table.
> 2.Create little php script which does this :
> select * from origTBL
> while($line=mysql_fecth_array($res)){
> insert into newtbl val
You van do this :
1.Create new table with exactly the same structure as orig table.
2.Create little php script which does this :
select * from origTBL
while($line=mysql_fecth_array($res)){
insert into newtbl values()
}
In the new tbl yuo will have the records ordered.
Than just
- Original Message -
From: "Larry E. Ullman" <[EMAIL PROTECTED]>
To: "Rahul S.Johari" <[EMAIL PROTECTED]>
Cc: "PHP"
Sent: Tuesday, November 08, 2005 3:38 PM
Subject: Re: [PHP] Fixing ID's in mySQL Table
Is there a way to fix ID sequen
Is there a way to fix ID sequence in a MySQL table using PHP?
Basically I have some tables with a lot of records, 1000 to 5000.
‘ID’ is
the Primary Key column in these tables, and at the time the code was
originally written, there weren’t much verification of data being
input
going on. Thus
Ave,
This is what I need to do.
Let's say, my ID's in a table look like this:
1
7
9
11
12
19
26
27
29
30
I need to alter the table so that the ID's are in a sequence like this:
1
2
3
4
5
6
7
8
9
10
It's easy to manually do this if you have a table with 10 records, but you
can't do it manually
At 09:37 AM 11/8/2005, Rahul S. Johari wrote:
Ave,
Is there a way to fix ID sequence in a MySQL table using PHP?
Basically I have some tables with a lot of records, 1000 to 5000. ID¹ is
the Primary Key column in these tables, and at the time the code was
originally written, there weren¹t mu
- Original Message -
From: "Rahul S. Johari" <[EMAIL PROTECTED]>
To: "PHP"
Sent: Tuesday, November 08, 2005 2:37 PM
Subject: [PHP] Fixing ID's in mySQL Table
Ave,
Is there a way to fix ID sequence in a MySQL table using PHP?
Basically I have some tables with a lot of records, 1000
8 matches
Mail list logo