We treat “time” as an integer now. The benefit of using %t for time would be that it might be clearer to read, and might make life easier for us if in 2038 we want to store times differently :). The downside would be that %t would probably be an “alias” for %d.

 

I have also been wondering about named parameters recently. Hence getting schema generation sorted so it’s possible to test some of the oddities of the various db engines.

 

From: Victor Boctor [mailto:notifications@github.com] 
Sent: 05 April 2014 06:33
To: mantisbt/mantisbt
Cc: grangeway
Subject: Re: [mantisbt] Mantis 2.0 - Database Layer Patch (#156)

 

In core/history_api.php:

>                                     ( user_id, bug_id, date_modified, type, old_value, new_value, field_name )
>                              VALUES
> -                                   ( " . db_param() . ', ' . db_param() . ', ' . db_param() . ', ' . db_param() . ', ' . db_param() . ',' . db_param() . ', ' . db_param() . ')';
> -     db_query_bound( $query, array( $t_user_id, $p_bug_id, db_now(), $p_type, $c_optional, $c_optional2, '' ) );
> +                                   ( %d, %d, %d, %d, %s, %s, %s)";

Since you have %d, %s, and %b. Should there be a %t for time?

—
Reply to this email directly or view it on GitHub <https://github.com/mantisbt/mantisbt/pull/156/files#r11320155> .  <https://github.com/notifications/beacon/434241__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxMjI5NTIwMSwiZGF0YSI6eyJpZCI6MjkzMzYwNTJ9fQ==--6c454bd1da688bc436027c0bcf99f2ebf58330a1.gif>