16.02.2013, 15:33
Already started and got stuck here:
I want to insert a value in the 'id' wherein it starts 0001. After which it then proceeds to 0002 so on and so forth. Also, if there is a deleted player how can I 'fill' a number in? For example if ID 0002 will be deleted, the next player who'll register will get that special ID instead of 0003.
I'm guessing I have to loop through all of the rows in the table to find the empty slot in which to be filled in. Could anyone show me about how would I be going to do that?
Cheers to anyone who's willing to help
pawn Код:
if(dialogid == 23)
{
if(response)
{
switch(listitem)
{
case 0:
{
//new Year, Month, Day;
//getdate(Year, Month, Day);
//new dateform[100];
//format(dateform,sizeof(dateform), "%02d/%02d/%d", Day, Month, Year);
new form2[30];
format(form2,sizeof(form2), "No Transaction");
new bankquery[300];
format(bankquery, sizeof(bankquery), "INSERT INTO `pinfo` (`id`, `name`, `money`, `latesttransaction`) VALUES ('%d', '%s', 0, '%s')", /*????????*/ , escpname(playerid), form2);
I'm guessing I have to loop through all of the rows in the table to find the empty slot in which to be filled in. Could anyone show me about how would I be going to do that?
Cheers to anyone who's willing to help