Skip to content

Confusing '~!' #1

@vladsavchuk

Description

@vladsavchuk

~! is a bit confusing to say 'do not quote this':

$item['upd_time']='~!now()';

"BITWISE INVERTION of NOT now()?" What is that?
I've spent some time to figure out what does ~! mean. In MySQL it actually evaluates into some weird value:

MariaDB [mysql]> select ~!now();
+----------------------+
| ~!now()              |
+----------------------+
| 18446744073709551615 |
+----------------------+

Need to make a notice about it in Documentation. Probably change

 *     'upd_time'   => '~!now()', #will set upd_time=now()

to something more descriptive

 *     'upd_time'   => '~!now()', # '~!' prefix means not to quote, i.e.: SET upd_time=now()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions