Obviously not enough of data. My bad
Idea is to have a device that will send some random string via GET. Say: 123gh5
On server I query DB, check last ID, increment to one more and insert that incremented ID into DB. But also put together this ID and this string and insert that, too. Let's call it newID. I hope it is not too confusing.
This ID in DB is INT type, and newID is VARCHAR. But on server, it just doesn't pass $z = $x.$y;. It doesn't pass to inserting query.
Say, this is GET request:
somesite.com/index.php?upit=id&espID=12a456?id=12a456
And on server:
if ($_SERVER["REQUEST_METHOD"] == "GET") {
$action = $_GET["upit"];
if ($action == "id"){
$espID = $_GET["espID"];
$sql = mysqli_query($con,"SELECT * FROM autoSetup ORDER BY deviceID DESC LIMIT 1");
while($row = mysqli_fetch_array($sql,MYSQLI_ASSOC)){
$newID = $row["deviceID"] + 1;
}
echo $newID;
$IDID = $newID.$espID;
mysqli_query($con,"INSERT INTO autoSetup (deviceID, espID, UID, date) VALUES ('$newID', '$espID',$IDID, now())");
}
}
You can see here it is a part of a ESP MCU system I build.
So deviceID is INT, espID and UID are VARCHAR.