Forum Moderators: open
$dateTimeCreation = date ( 'Y-m-d h:m:s' );
"SELECT userId from people where dateTimeCreation = STR_TO_DATE('{$dateTimeCreation}', '%Y-%m-%d %h:%i:%s');";
$dateTimeCreation = strtotime($dateTimeCreation);
"SELECT userId from people where UNIX_TIMESTAMP(dateTimeCreation) = '$dateTimeCreation'"
Then if it still doesn't work, you can echo both values to see how many seconds they're off of each other and narrow down the problem.
I guess i need to find out what can be wrong with the current code, then look for alternatives, otherwise i might find myself trying alternatives for a long time.
Can anyone point out something wrong with the code up there?
or maybe just some thoughts about what else could cause such a problem with a seemingly straightward comparison.