<?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: Need the field names via SQL</title>
		<link>https://legacy.forums.gravityhelp.com/topic/need-the-field-names-via-sql</link>
		<description>Gravity Support Forums Topic: Need the field names via SQL</description>
		<language>en-US</language>
		<pubDate>Thu, 09 Apr 2026 06:08:11 +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/need-the-field-names-via-sql" rel="self" type="application/rss+xml" />

		<item>
			<title>David Smith on "Need the field names via SQL"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/need-the-field-names-via-sql#post-42972</link>
			<pubDate>Fri, 02 Dec 2011 20:09:12 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">42972@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Scott,&#60;/p&#62;
&#60;p&#62;Your best bet will be to do some post processing to the returned data after you've retrieved it form the database. To get the form meta unserialized you can use this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
$form = RGFormsModel::get_form_meta($form_id);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Then you could loop through the items of your returned data and drill down in the $form array to get the matching field ID and then the corresponding field label.&#60;/p&#62;
&#60;p&#62;Let me know if you have any other questions.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Scott on "Need the field names via SQL"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/need-the-field-names-via-sql#post-42881</link>
			<pubDate>Fri, 02 Dec 2011 13:05:49 +0000</pubDate>
			<dc:creator>Scott</dc:creator>
			<guid isPermaLink="false">42881@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have some sql I use to pull some reports out from the db tables.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;SELECT
pziou_rg_form.id,
pziou_rg_form.title,
pziou_rg_lead.date_created,
pziou_rg_lead.ip,
pziou_rg_lead.source_url,
pziou_rg_lead_detail.field_number,
pziou_rg_lead_detail.&#38;lt;code&#38;gt;value&#38;lt;/code&#38;gt;
FROM
pziou_rg_form
INNER JOIN pziou_rg_lead ON pziou_rg_form.id = pziou_rg_lead.form_id
INNER JOIN pziou_rg_lead_detail ON pziou_rg_lead.id = pziou_rg_lead_detail.lead_id&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Works well, but obviously the fields are only identified by the field number.&#60;/p&#62;
&#60;p&#62;How/Where can I get that data?&#60;/p&#62;
&#60;p&#62;I see the _meta table filled with serialized data, but I'm having a bit of trouble understanding how it's formatted.  It looks like a multidimensional JSON array.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
