Title: Outputting data in php
Last modified: May 14, 2024

---

# Outputting data in php

 *  Resolved [thebigdotco](https://wordpress.org/support/users/thebigdotco/)
 * (@thebigdotco)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/outputting-data-in-php/)
 * Having some difficulty grabbing date specific info from the database:
 *         $start_date = date(‘Y-m-d’, strtotime($dates[0]));
 *         $end_date = date(‘Y-m-d’, strtotime($dates[1] . ‘ +1 day’));
 *         include_once( WP_PLUGIN_DIR . ‘/wp-slimstat/admin/view/wp-slimstat-db.
   php’ );
 *         $time_range_condition = “strtotime between ‘” . $start_date . “‘ and ‘”.
   $end_date . “‘”;
 *         wp_slimstat_db::init($time_range_condition);  

Viewing 1 replies (of 1 total)

 *  Plugin Support [Amir](https://wordpress.org/support/users/amirfallah/)
 * (@amirfallah)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/outputting-data-in-php/#post-17767831)
 * Hi [@thebigdotco](https://wordpress.org/support/users/thebigdotco/),
 * I apologize for the delay in responding.
   You can use the sample code below to
   retrieve information.
 *     ```wp-block-code
       include_once( WP_PLUGIN_DIR . '/wp-slimstat/admin/view/wp-slimstat-db.php' );
       wp_slimstat_db::init();
       $result = wp_slimstat_db::get_recent($_column = '*', $_where = 'dt between startDate and endDate', $_having = '', $_use_date_filters = true, $_as_column = '', $_more_columns = '' );
       ```
   
 * Replace the `startDate` and `endDate` in the code with the dates in **Unix Time**
   format.
 * Please let me know if you have any further questions or need assistance.
   Regards,

Viewing 1 replies (of 1 total)

The topic ‘Outputting data in php’ is closed to new replies.

 * ![](https://ps.w.org/wp-slimstat/assets/icon.svg?rev=2832242)
 * [SlimStat Analytics](https://wordpress.org/plugins/wp-slimstat/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-slimstat/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-slimstat/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-slimstat/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-slimstat/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-slimstat/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Amir](https://wordpress.org/support/users/amirfallah/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/outputting-data-in-php/#post-17767831)
 * Status: resolved