What might be the problem? [Question]
#7

No he doesn't! That's not a valid solution to the situation as it will just insert a new row, won't it?

What SELECT LAST_INSERT_ID() FROM vehicles gives you is a single row with one value: the last increment ID generated. So what you should do instead is:
pawn Код:
mysql_query("SELECT LAST_INSERT_ID() FROM `vehicles`");
mysql_store_result();
new overall = mysql_fetch_int();
printf("Overall: %d", overall);
mysql_free_result();
Reply


Messages In This Thread
What might be the problem? [Question] - by T0pAz - 03.02.2012, 13:53
Re: What might be the problem? [Question] - by coole210 - 03.02.2012, 14:06
Re: What might be the problem? [Question] - by T0pAz - 03.02.2012, 14:11
Re: What might be the problem? [Question] - by coole210 - 03.02.2012, 14:55
Re: What might be the problem? [Question] - by Johnson_boy - 03.02.2012, 15:34
Re: What might be the problem? [Question] - by T0pAz - 03.02.2012, 15:41
Re: What might be the problem? [Question] - by AndreT - 03.02.2012, 15:51
Re: What might be the problem? [Question] - by T0pAz - 03.02.2012, 16:43
Re: What might be the problem? [Question] - by coole210 - 03.02.2012, 16:47
Re: What might be the problem? [Question] - by T0pAz - 03.02.2012, 16:54

Forum Jump:


Users browsing this thread: 1 Guest(s)