hey all, I'm having trouble with database function...
# help
r
hey all, I'm having trouble with database functions, I think it's an issue with case sensitivity...? Here's the function body:
Copy code
begin
  update spells
  set timesPlayed = timesPlayed + 1
  where code = spellcode;
end;
I'm getting an error about how the column
timesplayed
doesn't exist, and maybe I meant
timesPlayed
(even though that's obviously what I have in the function). Any easy way to fix this?
n
Hello @robin! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
g
Postgres is best used with all lower case (time_played) columns and tables. Your life will be simpler. If you can't then you must Always use double quotes around your column or table names "timesPlayed".
n
robin (2022-04-22)
r
hmmm thamks. I'll see if I can easily change it in my JS code to match