Assign Max() MySQL command to a variable in PHP -
In my mysql database, I enter an entry in DB, and then I need to get the number of that last entry. I have set it on auto-pay increment Question "Use Select from the table" (id); Works fine in the database, I need to capture that number into a variable in PHP.
$ rowSQL = mysqli_query ($ con, "MAX (ID) from selection table"); $ Line = mysqli_fetch_assoc ($ line sql); $ Largest uid = $ line ['max']; Counterpart $ largest UID; Thanks for the help!
AS in your query modifier this modifier nicknamed your selected item $ rowSQL = mysqli_query ($ con, "select MAX (ID) table from AS max"); $ Line = mysqli_fetch_assoc ($ line sql); $ Largest UID = $ line ['maxid']; Counterpart $ largest UID;
Comments
Post a Comment