Wednesday, November 22, 2017

How to get the next auto-increment id in mysql

Do you want the next id, or the id of the row that you are currently inserting? That is, should the id at the end of the payment code be the id of the row in which the payment code is stored?

The way how to you get the last value of auto increament:
$SQL = "SELECT AUTO_INCREMENT sequentialnumber FROM information_schema.tables WHERE table_name = 'imagegambar'";
$QUERY         = mysqli_query($KONN,$SQL);
$rows              = mysqli_fetch_array($QUERY);
$tempnumber  = $rows["sequentialnumber"];

return $tempnumber;


How to change label text using Javascript

1. Make the new ID for <label> 2. Loaded first the label element when script is executed.