This is actually a SQL question and not a KiXtart question in itself.
You should go to the UDF Forum and look up the DB...() UDFs, which is a set of UDFs for database connectivity.
You'd do something like this (pseudo-code):
code:
$userid=dbgetrecordset("SELECT UserID From UserIDTable WHERE USERID='"+@USERID+"'")
if vartype($userid) & 8192
; User ID exists, so update entry
$rc=dbexecutesql("UPDATE UserIDTable SET () VALUES () WHERE USERID='"+@USERID+"'")
else
; user ID does not exist, so insert entry
$rc=dbexecutesql("INSERT INTO UserIDTable...")
endif
Finally, please post your code in between [code] tags. And get rid of those long lines! Read ABC's of KiXtart board etiquette and message to new forum users
[ 23. November 2002, 04:08: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.