> Hey John,
> Thanks for the reply,
> Am a bit confused, 2 guys already gave me the advise you are giving me
but
> you also say
> "CHANGE COLUMN old_column_name new_column_name"
> why to change the column name? dont I only have to change it from
being an
> "int" to an "Auto_Increment"?
Yes. That'
Hey John,
Thanks for the reply,
Am a bit confused, 2 guys already gave me the advise you are giving me but
you also say
"CHANGE COLUMN old_column_name new_column_name"
why to change the column name? dont I only have to change it from being an
"int" to an "Auto_Increment"?
Kindly reply,
Cheers,
-R
ALTER TABLE your_table CHANGE COLUMN old_column_name new_column_name NOT
NULL AUTO_INCREMENT PRIMARY KEY;
Then use mysql_insert_id() in your PHP code to retrieve the ID that is
generated upon INSERTs.
---John Holmes...
> -Original Message-
> From: Ryan A [mailto:[EMAIL PROTECTED]]
> Sen
Thanks guys,
I thought it would be much more complicated than that but will look into the
alter table thing.
Sorry forgot to mention in the first mail, I am using MySql as its the
cheapest database to get from a hosting company,otherwise on my personal
machine I use MySql and/or Oracle 7.3 (pirate
>Chris Shiflett wrote:
> I didn't catch which database you are using, but you can alter a field
> in MySQL to add the auto_increment characteristic. Look into the "alter
> table" SQL statement.
And if you do that, there won't be any trouble with the existing IDs. mysql
will grab the next highe
I didn't catch which database you are using, but you can alter a field
in MySQL to add the auto_increment characteristic. Look into the "alter
table" SQL statement.
Happy hacking.
Chris
Ryan A wrote:
>how do i use the current table BUT use the more useful auto increment and
>LAST_INSERT_ID(
6 matches
Mail list logo