Organizational Research By

Surprising Reserch Topic

mysql php how to get auto increment field value before inserting data


mysql php how to get auto increment field value before inserting data  using -'php,mysql'

I'm uploading image file to storage server. Before uploading I should compose filename, which contains AUTOINCREMENT VALUE in it (for example, 12345_filename.jpg).

How could I get autoincrement value before inserting into DB?

I see only one solution


insert empty row
get it's autoincrement value
delete this row
insert row with real data using autoincrement value from p.1


Is there any other solutions?

Thank you
    
asked Oct 13, 2015 by mannumits1
0 votes
14 views



Related Hot Questions



Government Jobs Opening


...