Disco
Joined: 06 Dec 2006 Posts: 152
|
Posted: Fri Apr 13, 2007 10:35 Post subject: Valid SELECT returning no results in NWNX |
|
|
Hello,
I got a weird problem, and I probably just miss something incredibly obvious....
I have a table that contains a few records that I want to retreive in NWN1. I use NWNX2. I made a simple SELECT statement which I retreive with the usual While loop.
Code: | sQuery = "SELECT * from TableName";
SendMessageToPC( oPC, sQuery );
SQLExecDirect(sQuery );
if ( SQLFetch() == SQL_SUCCESS ) {
SendMessageToPC( oPC, "Result: "+ SQLGetData(1) );
} |
The weird thing is that I don't get any results, although the query is valid when used in PHPMyAdmin. I copy it straight from the chatlogfile, NWNX log doesn't give me any OBDC errors, and SQLFetch() really doesn't return SQL_SUCCESS. I also tried returning just one row without the While loop, still no go.
Writing and updating records works fine in the same script.
No clue what's wrong, but maybe someone else ran into this before. I managed to retreive data before (in another module, though). |
|