[Q] Livewire cursor SELECT MAX(..)... doesn't work properly ?
Posted in 1996
I'm creating a webpage that provides clients with a new, unique userid.
This id is generated by taking the highest existing id in the database,
and adding 1 to that number :
SELECT MAX(clubnr)+1 FROM clubmembers
this query works perfectly when running from dbaccess
then I try embed it within a webpage with livewire :
<server>
database.SQLTable("SELECT MAX(clubnr)+1 FROM clubmembers")
</server>
works fine and returns the correct number
now I want to get this number into a variable :
<server>
tempCurs = database.cursor("SELECT MAX(clubnr)+1 FROM clubmembers")
newNum = tempCurs[0]
write(newNum)
</server>
but whatever I try, the contents of newNum is alway null.
is there anyone in this newsgroup with LiveWire experience who can help me
out on this ?
thanks in a million !