I want to insert many lines, but in one column I would like it to increment. In my example I am setting a variable to 5000 and I would like it to increment by one, every time a line is added to the database.
I will say now this has nothing to do with auto increment. There is a reason I need an incrementing field.
Here is my insert query
$incrementField=5000;
$query="INSERT INTO `table` (`incrementField`,`this`,`morestuff`)
SELECT ?,`this`,`morestuff` FROM `someTable`";
$stmt = $db->prepare($query);
$stmt->bind_param('i',$incrementField);
$stmt->execute();
$stmt->close();
Where the ? is I would like it to increment. I have tried ?+1 ?.+1 and all kinds of permutations, but nothing seems to work.