Howdy CR! (again)
I've been posting too much lately, I know. But I'm working on a major project now using all SORTS of goodies - networking and MySQL among them. Anyway, I seem to have your MySQL plugin setup fine - I can read data from MySQL and already know I can write to it too. However, the program crashes at a point that - as far as I can tell - I'm not doing anything too bizarre. I'll post the relevant code here:
`CheckWatchdog()
if watchdogcheck < (timer()-(1000 * WatchdogHowOften))
curtimer = timer()
timeago = curtimer - (1000 * watchdogtimeout)
query$ = "SELECT * FROM seats WHERE status = 'CONNECTED' AND lastcheckin < '" + str$(timeago) + "'"
numrows=MySQL_RunStatement(query$)
if numrows < 0
`No one has timed out yet. Do nothing.
else
for z = 0 to numrows
r$ = ""
r$=MySQL_GetWholeRow(z,"*")
text_over_sprite(100,500,350,"Timeout on seat#", 0)
text_over_sprite(101,500,380,"r$", 0)
x=val(left$(r$,2))
It's dying at the 4th from the bottom line: r$=MySQL_GetWholeRow(z, "*"). If I comment that line out it runs ok. Also numrows stays -1 as it should until the query catches a valid row. Then it goes to 0 so there SHOULD be valid data in there. Am I missing something basic here? It should be noted I use essentialy similar code to look up another table at the VERY start of this program and that works fine. Do I need to reset something between running a MySQL_GetWholeRow() command perhaps?
Signatures are a waste of bytes.