gabordemooij/redbean — Issue #96: Mix SQL with Beans
Author: gabordemooij
Created: 2011-10-21 22:15:07+00:00
State: open

There doesn't seem to be anyway that you can make use of SQL functions
with redbean, in particular, it would be nice to be able somehow to do
things like:

$bean->field = 'NOW()';

And, no, saying

$bean->field = time();

is *not* an adequate substitute : I want the time on the database
server which may not be the machine my PHP is running on.

same sort of thing happens in WHERE clauses as there is no easy way
(that I know of) of marking a value as not needing to quoted if you
are trying to use substitution (yes, you can clearly construct the
where clause as a string from scratch and do it that way but it seems
a bit clunky)