HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Search
-
Re: Strings or Integers for Storing Types in Database
And @businessdad brings up a great point: Always strtolower before doing string comparisons. Wherever you find integer being use to show status in Vanilla where it goes beyond 0 & 1 (like the 0,1,2 for Announce and the 0,1,2 for Admin flag) it's an architectural mistake we made. Those should've (and would've) been strings… -
Strings or Integers for Storing Types in Database
I have a table called Article with a column called Status. In the code, the status value is used to indicate whether an article is in draft, pending review, or published state. I can store those values in the database as integers defined in the code, or use an enum, with 0 for draft, 1 for pending review, and 2 for…
2 results