07.10.2014, 22:41
I have autoincriment set in my database.
Say, I want to insert data into the table, then pull the ID. What is the best way to do this? I was hoping it automatically did SELECT like some plugins do..
I would just select the id from projects where owner and name = ^, but if I can help it, I dont want either of those to be unique.
What's the best way to pull the id?
Say, I want to insert data into the table, then pull the ID. What is the best way to do this? I was hoping it automatically did SELECT like some plugins do..
Код:
mysql_format(con, query, sizeof(query),"INSERT INTO `projects` (`OWNER`, `NAME`) VALUES ('%s', '%s')", GetName(playerid), inputtext);
What's the best way to pull the id?