View Single Post
Author Message
KaOs
Senior Member
Join Date: Apr 2004
Old 02-08-2008 , 18:18   SQL: Very confused!
Reply With Quote #1

Ok lol this is my last question..

Now, I'm not an idiot, I program PHP and MySQL all day long, but this I just don't understand..

Code:
                new plrUniqueID;
		new Handle:Result = SQL_Query(DB, QueryString);
		plrUniqueID = SQL_GetInsertId(Result);
I get error:
Quote:
Native "SQL_GetInsertId" reported: Invalid statement or db Handle 5f9f0120 (error: 2)




Then I tried:

Code:
                new plrUniqueID;
		new Handle:Result = SQL_Query(DB, QueryString);
                SQL_FetchRow(Result);
		plrUniqueID = SQL_GetInsertId(Result);
I get error:
Quote:
Native "SQL_FetchRow" reported: No current result set

WITH BOTH CODES I GET THE ROW INSERTED INTO MY DB! The query is executing!!!
__________________
KaOs is offline
Send a message via AIM to KaOs Send a message via MSN to KaOs