I just learned about a cool function -- "mysql_insert_id()".
You can read about it in the manual, but it sounds like it could be used
to get the AUTO_INCREMENT number from the database and you can then
append that number to your uploaded image file name.
Erik
On Thursday, January 24, 2002, a
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
says...
> I did that with this script and it works fine, but the reason I am doing it
> is so I can then give the image which is uploaded the story ID. But for some
> reason I can't get it to work... here is the auto_increment script any ideas
> o
I did that with this script and it works fine, but the reason I am doing it
is so I can then give the image which is uploaded the story ID. But for some
reason I can't get it to work... here is the auto_increment script any ideas
of how to add the ID to the image?? I would be very great ful if
All you need to do is the set the field type for the id similar to :
ID smallint not null primary key auto_increment
you do not need to refer to ID in your insert statement.
/dkm
- Original Message -
From: "will hives" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January
In your database, make the ID column AUTO_INCREMENT, and then simply don't
specify a value for it when you insert.
- Original Message -
From: "will hives" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 24, 2002 11:43 AM
Subject: [PHP] Increment help..please
> please
Why don't you just set auto_increment on the id field in the database table?
Tyler
- Original Message -
From: "will hives" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 24, 2002 1:43 PM
Subject: [PHP] Increment help..please
> please help I'm a newb and this is rea
6 matches
Mail list logo