<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Daily Report - List Entries</title>
		<link>https://legacy.forums.gravityhelp.com/topic/daily-report-list-entries</link>
		<description>Gravity Support Forums Topic: Daily Report - List Entries</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 20:04:01 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/daily-report-list-entries" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Daily Report - List Entries"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/daily-report-list-entries#post-103762</link>
			<pubDate>Tue, 18 Dec 2012 00:06:45 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">103762@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You could mimic the export routine that Gravity Forms uses, and script it by using wp_cron() or an actual shell cron job.  There have been no further updates on automated exports of the entries.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Josh Fialkoff on "Daily Report - List Entries"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/daily-report-list-entries#post-103712</link>
			<pubDate>Mon, 17 Dec 2012 21:55:11 +0000</pubDate>
			<dc:creator>Josh Fialkoff</dc:creator>
			<guid isPermaLink="false">103712@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
Is there an update on this?&#60;br /&#62;
Are there any other ways to automatically create a daily (or periodic) summary of form submissions and have it sent to specific recipients?&#60;br /&#62;
Thanks,&#60;br /&#62;
Josh
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mshussein on "Daily Report - List Entries"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/daily-report-list-entries#post-88106</link>
			<pubDate>Tue, 06 Nov 2012 20:21:09 +0000</pubDate>
			<dc:creator>mshussein</dc:creator>
			<guid isPermaLink="false">88106@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I am trying to create a report that is run daily via cron which will list all entries for that day.&#60;/p&#62;
&#60;p&#62;I am creating from plain old PHP (ie: i'm not using wordpress/gravity forms functions whatsoever).&#60;/p&#62;
&#60;p&#62;All is well, I can get all the data, but how do I get the NAMES of the fields?&#60;/p&#62;
&#60;p&#62;How do I know what each 'field_number' means?&#60;/p&#62;
&#60;p&#62;Do I need to look at a meta table and unserialize some text into a PHP array?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$result = mysql_query(&#38;quot;
        SELECT wp_rg_lead.id,
               wp_rg_lead.form_id,
               wp_rg_lead.post_id,
               wp_rg_lead.date_created,
               wp_rg_lead.ip,
               wp_rg_lead.source_url,
               wp_rg_lead.user_agent ,
               wp_rg_lead_detail.field_number,
               wp_rg_lead_detail.value,
               wp_rg_lead_detail_long.value as long_value
        FROM wp_rg_lead LEFT JOIN wp_rg_lead_detail ON wp_rg_lead.id = wp_rg_lead_detail.lead_id
                        LEFT JOIN wp_rg_lead_detail_long ON wp_rg_lead_detail.id = wp_rg_lead_detail_long.lead_detail_id
        ORDER BY date_created DESC; &#38;quot;);

    echo &#38;quot;&#38;lt;table&#38;gt;&#38;quot;;

    // build leads into array
    $leads = array();
    while ($row = mysql_fetch_assoc($result)) {
        // if the lead isnt in the array, then add it
        if (!isset($leads[$row[&#38;#39;id&#38;#39;]])) {
            $leads[$row[&#38;#39;id&#38;#39;]] = $row;
        }

        // store the data and field
        $leads[$row[&#38;#39;id&#38;#39;]][&#38;#39;fields&#38;#39;][$row[&#38;#39;field_number&#38;#39;]] = $row[&#38;#39;value&#38;#39;];
    }

    $doneHeader = false;
    foreach ($leads as $id =&#38;gt; $lead) {
        // if we haven&#38;#39;t done the table header, then do it
        if (!$doneHeader) {
            echo &#38;quot;&#38;lt;tr&#38;gt;&#38;quot;;
            foreach ($lead as $name =&#38;gt; $value)
                echo &#38;quot;&#38;lt;th&#38;gt;{$name}&#38;lt;/th&#38;gt;&#38;quot;;
            echo &#38;quot;&#38;lt;/tr&#38;gt;&#38;quot;;
            $doneHeader = true;
        }

        echo &#38;quot;&#38;lt;tr&#38;gt;&#38;quot;;
        foreach ($lead as $name =&#38;gt; $value) {
            if ($name == &#38;#39;fields&#38;#39;) {
                echo &#38;quot;&#38;lt;td&#38;gt;&#38;quot;;
                foreach ($value as $fid =&#38;gt; $fv) {
                    echo &#38;quot;{$fv}&#38;lt;br&#38;gt;&#38;quot;;
                }
                echo &#38;quot;&#38;lt;/td&#38;gt;&#38;quot;;
            } else {
                echo &#38;quot;&#38;lt;td&#38;gt;{$value}&#38;lt;/td&#38;gt;&#38;quot;;
            }
        }

        echo &#38;quot;&#38;lt;/tr&#38;gt;&#38;quot;;
    }
    echo &#38;quot;&#38;lt;/table&#38;gt;&#38;quot;;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
