mysql ile tablodan yankı tamsayı

0 Cevap php

I'm building a user database for my website. One of the table columns is "id" where the user is given a reference number. In order to add new users, I have to select the last-registered user, extract the ID, add 1 to it, then submit that back into a new row for the new user. I'm currently using:

$query = mysql_query("SELECT MAX(id) FROM users;");

to select the maximum ID number. When I added 1 to that and tried to echo, it printed "Request ID#3" in the browser.

Nasıl, yüksek ID almak birini eklemek ve yeni kayıt kullanıcı için kullanacağı bir senaryo yazabilirim?

0 Cevap