View previous topic :: View next topic |
Author |
Message |
cma_dev
Joined: 22 May 2005 Posts: 6
|
Posted: Sun Dec 11, 2005 19:46 Post subject: Not sure why code is not working |
|
|
I'm able to put data into my database server with no problems, it just seems to be a matter of getting the data out. I'm currently testing methods of getting the data out and I've been using SendMessageToPC() to try to get to the data...
Code: |
#include "aps_include"
void main()
{
//DEBUG
object oPC = GetLastUsedBy();
string player = GetPCPlayerName(oPC);
string sql = "SELECT PlayerID FROM PLAYER WHERE PlayerName = '" + player + "'";
string debug;
string msg;
SQLExecDirect(sql);
while(SQLFetch() == SQL_SUCCESS)
{
debug = SQLGetData(1);
msg = "Data from MySQL = " + debug;
}
SendMessageToPC(oPC, msg);
}
|
This doesn't seem to work no matter which way I try it. The data never seems to come back. What am I doing wrong?
Thanks in advance for any help. |
|
Back to top |
|
|
cma_dev
Joined: 22 May 2005 Posts: 6
|
Posted: Sun Dec 11, 2005 20:14 Post subject: |
|
|
I'm not getting a "Sent Response" line in the ODBC log either. Could this be because I am using MySQL 5.0??? |
|
Back to top |
|
|
cma_dev
Joined: 22 May 2005 Posts: 6
|
Posted: Sun Dec 11, 2005 21:02 Post subject: |
|
|
Oh I am sooooooo stupid...
I did not use SQLInit() for the mod onload...
That did it.
|
|
Back to top |
|
|
|