I do not know if this is bug or what I am doing wrong?
This code have a weird behavior:
code_language.skript:
set {_resultSet} to mysql result of query "SELECT address,timestamp FROM ckciplog.log WHERE `name` = 'Martini002' GROUP BY `address` ORDER BY `timestamp` DESC LIMIT 10"
set {_RStimestamp} to {_resultSet}
set {_RSaddress} to {_resultSet}
delete {_timeStamp::*}
delete {_address::*}
#message "%{_timeStamp::1}% - %{_address::1}%"
set {_timeStamp::*} to mysql string "timestamp" in {_RStimestamp}
set {_address::*} to mysql string "address" in {_RSaddress}
message "%{_timeStamp::1}% - %{_address::1}%"
message "%{_RStimestamp}% - %{_RSaddress}%"
I tried several ways to get it working but not success.. This example is the last way I have tested, that is why its look really inefficient..
But this is for testing purpouses..
I will not explain the working of this code because it is clear,
the final result I get with this code is:
code_language.skript:
message "%{_timeStamp::1}% - %{_address::1}%"
message "%{_RStimestamp}% - %{_RSaddress}%"
Code:
2017-02-21 - <none>
resultSetString - resultSetString
If I switch from this:
code_language.skript:
set {_timeStamp::*} to mysql string "timestamp" in {_RStimestamp}
set {_address::*} to mysql string "address" in {_RSaddress}
to this:
code_language.skript:
set {_timeStamp::*} to mysql string "address" in {_RStimestamp}
set {_address::*} to mysql string "timestamp" in {_RSaddress}
Then I get
Code:
192.12.20.1 - <none>
resultSetString - resultSetString
Really weird for me.
I am trying to perform something like this:
code_language.skript:
set {_resultSet} to mysql result of query "SELECT address,timestamp FROM ckciplog.log WHERE `name` = 'Martini002' GROUP BY `address` ORDER BY `timestamp` DESC LIMIT 10"
delete {_timeStamp::*}
delete {_address::*}
set {_timeStamp::*} to mysql string "timestamp" in {_resultSet}
set {_address::*} to mysql string "address" in {_resultSet}
message "%{_timeStamp::1}% - %{_address::1}%"
But not success, the behavior is the same as explained before.
[doublepost=1487709582,1487708289][/doublepost]The unique way I found to get the desired result was:
code_language.skript:
set {_resultSet} to mysql result of query "SELECT timestamp FROM ckciplog.log WHERE `name` = 'Martini002' GROUP BY `address` ORDER BY `timestamp` DESC LIMIT 10"
delete {timeStamp::*}
set {timeStamp::*} to mysql string "timestamp" in {_resultSet}
set {_resultSet} to mysql result of query "SELECT address FROM ckciplog.log WHERE `name` = 'Martini002' GROUP BY `address` ORDER BY `timestamp` DESC LIMIT 10"
delete {address::*}
set {address::*} to mysql string "address" in {_resultSet}
message "%{timeStamp::1}% - %{address::1}%"
But I do not like this way..