quick mysql question
#1

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..

Код:
mysql_format(con, query, sizeof(query),"INSERT INTO `projects` (`OWNER`, `NAME`) VALUES ('%s', '%s')", GetName(playerid), inputtext);
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?
Reply


Messages In This Thread
quick mysql question - by TakeiT - 07.10.2014, 22:41
Re: quick mysql question - by Chenko - 07.10.2014, 23:33
Re: quick mysql question - by Shaneisace - 07.10.2014, 23:41
Re: quick mysql question - by TakeiT - 07.10.2014, 23:49
Re: quick mysql question - by TakeiT - 08.10.2014, 00:40
Re: quick mysql question - by Chenko - 08.10.2014, 02:08

Forum Jump:


Users browsing this thread: 3 Guest(s)