Jump to content

PsiWray

Members
  • Posts

    3
  • Joined

  • Last visited

About PsiWray

  • Birthday 10/11/1997

Details

  • Location
    Italy
  • Interests
    Software and hardware development.

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

PsiWray's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

1

Reputation

  1. Actually I've found the solution. When working with booleans, the query result is of type "number". That allows you to discriminate between existing values and NULL values. For example, if you query for a boolean column and you get a result of type boolean and of value false, that means the column doesn't have a value. If on the other hand, you receive a result of type number and value 1/0 then you can cast to boolean and the thing is done.
  2. I was thinking about a situation where you have a stored BOOL inside the MySQL table and you either have its value (which can be true/false) or you don't, in which case you execute different code. I'm not in that situation yet but I was curious about this topic. I also understand that it's a very rare situation. Thanks for the answer.
  3. I have a database table that contains certain columns with NULL s or values, depending on if the value has already been set or not for the current record. When I query the columns of a specific record that contains those NULL cells, the value contained in the Lua table returned inside the result has a false value instead of (what I expected to be) a nil value. The type of the MySQL table column is TIMESTAMP. So my question is, am I doing something wrong and is there instead a way to correctly handle NULL cells inside a MySQL database or is it just like described above and there's nothing I can do about it? Thanks for support.
×
×
  • Create New...