-
PHP / MYSQL Epoch Date Between
I am working on a project that involves an order table. This table has a DatePlaced column on it stored as an INT. This is populated using time() which is the epoch time in seconds from x etc.
I need to be able to select all orders where the DatePlaced between y and z. Y and Z will be form elements from html/php. What fomatting/conversion do I need to do to get mysql to understand what I am looking for?
This is super easy in oracle, I am hoping there is an easy solution in mysql
Thanks in advance
-
-
think I got it figured out.
$from = strtotime($_POST["datefrom"]);
$to = strtotime($_POST["dateto"]);
$parse.=" where DatePlaced BETWEEN ".$from." and ".$to." ";
I am actually building the parse query string based on different determinants being supplied by the user. It seems to be working though.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks