I am writing a plugin for Wordpress, which should check if a mysql entry already exists. If it does not exist Wordpress should insert the entry into the table. This part
the value of column time must be enclosed with single quote
time
single quote
$wpdb->query($wpdb->prepare("UPDATE $table_name SET time='$current_timestamp' WHERE userid=$userid"));