View previous topic :: View next topic |
Author |
Message |
Quizz68
Joined: 26 Jun 2007 Posts: 8
|
Posted: Tue Jun 26, 2007 0:57 Post subject: Return empty? |
|
|
NWNX MySQL Plugin V.0.0.7
(c) 2007 by Ingmar Stieger (Papillon)
visit us at http://www.nwnx.org
(built using mysql-5.0.27 source)
* Log level set to 2 (everything)
* Connecting to server localhost
* Plugin initialized.
* Registering under function class SQL
* Executing: SELECT Name from TabPG where Id = 1
* Returning: (empty) (column 1)
if I try launch query in MYSQL Query browser gives back me a valid result, what is of wrong? |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Tue Jun 26, 2007 10:19 Post subject: |
|
|
Are you sure you are accessing the same database (happened to me...) ? _________________ Papillon |
|
Back to top |
|
|
Quizz68
Joined: 26 Jun 2007 Posts: 8
|
Posted: Tue Jun 26, 2007 14:35 Post subject: |
|
|
Papillon wrote: | Are you sure you are accessing the same database (happened to me...) ? |
yes i have only one |
|
Back to top |
|
|
Quizz68
Joined: 26 Jun 2007 Posts: 8
|
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Wed Jun 27, 2007 19:16 Post subject: |
|
|
Uh, pardon ? _________________ Papillon |
|
Back to top |
|
|
Quizz68
Joined: 26 Jun 2007 Posts: 8
|
Posted: Thu Jun 28, 2007 12:57 Post subject: |
|
|
I do not understand what agrees with this phrase "... NWNX doesn't react the same to invalid indexes as PHP SQL does.", I must set the indices in a particular way ?
thanks |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sun Jul 08, 2007 20:16 Post subject: |
|
|
No, I think the author meant that NWNX does not react like the PHP stuff does, if you pass it an invalid index.
Remember, 0 is the first column, 1 the second, and so on.
Now that you mentioned it... you should rewrite your SQLGetData statement... you have only one column in your result set (Name) and you try to get the second column (1). _________________ Papillon |
|
Back to top |
|
|
Quizz68
Joined: 26 Jun 2007 Posts: 8
|
Posted: Tue Jul 10, 2007 13:44 Post subject: |
|
|
Papillon wrote: | No, I think the author meant that NWNX does not react like the PHP stuff does, if you pass it an invalid index.
Remember, 0 is the first column, 1 the second, and so on.
Now that you mentioned it... you should rewrite your SQLGetData statement... you have only one column in your result set (Name) and you try to get the second column (1). |
this is my script query
string SQLStr = "SELECT Name from TabPG where Id = 1";
SQLExecDirect(SQLStr);
while (SQLFetch() == SQL_SUCCESS)
{
NamePG = SQLGetData(0);
}
and this is result
NWNX MySQL Plugin V.0.0.7
(c) 2007 by Ingmar Stieger (Papillon)
visit us at http://www.nwnx.org
(built using mysql-5.0.27 source)
* Log level set to 2 (everything)
* Connecting to server localhost
* Plugin initialized.
* Registering under function class SQL
* Executing: SELECT Name from TabPG where Id = 1
* Returning: (empty) (column 1)
and the NamePG is = to "" i try this query "SELECT * from TabPG where Id = 1" but the result is * Returning: (empty) (column -1)
i need some mysql dll in nwnx4 directory? |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sat Jul 14, 2007 15:51 Post subject: |
|
|
Ah sorry, my last statement is confusing. Let me rephrase:
If you write SQLGetData(1) in nwscript, that means: Get the first column of the resultset.
In the logfile, you should see: * Returning: abc1 (column 0), since 0 is the first column from the MySQL plugin's perspective.
So in your case, this should be in the logfile: * Returning: (empty) (column 0)
I'm am not sure what is going on... please double check your SQLGetData call and make sure that there is no other call to SQLGetData(2) somewhere else, which could produce this entry in the log file... _________________ Papillon |
|
Back to top |
|
|
Quizz68
Joined: 26 Jun 2007 Posts: 8
|
Posted: Fri Sep 07, 2007 9:03 Post subject: |
|
|
resolved, with version 1.08 the problem has not been introduced |
|
Back to top |
|
|
|