You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public function __construct(string $word, string $firstused)
{
$this->word = $word;
$this->firstused = $firstused;
}
/**
* Store everything in the database.
*/
public function store_data(): void
{
/**
* Store data in database table "words".
*/
db::query_exec('INSERT INTO words (word, length, total, firstused) VALUES (\''.$this->word.'\', LENGTH(\''.$this->word.'\'), '.$this->total.', \''.$this->firstused.'\') ON CONFLICT (word) DO UPDATE SET total = total + excluded.total');