<?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: RG_LEAD_DETAIL table uniques</title>
		<link>https://legacy.forums.gravityhelp.com/topic/rg_lead_detail-table-uniques</link>
		<description>Gravity Support Forums Topic: RG_LEAD_DETAIL table uniques</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 18:38:23 +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/rg_lead_detail-table-uniques" rel="self" type="application/rss+xml" />

		<item>
			<title>octoberblue on "RG_LEAD_DETAIL table uniques"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/rg_lead_detail-table-uniques#post-149455</link>
			<pubDate>Mon, 18 Feb 2013 14:52:42 +0000</pubDate>
			<dc:creator>octoberblue</dc:creator>
			<guid isPermaLink="false">149455@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yup, thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "RG_LEAD_DETAIL table uniques"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/rg_lead_detail-table-uniques#post-149448</link>
			<pubDate>Mon, 18 Feb 2013 14:38:38 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">149448@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Just to be sure I follow along, with this question:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
Perhaps you have an idea, or perhaps you could show me where the code exists to update the exisiting form from the admin area.
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Do you mean the code to update an existing &#60;em&#62;entry&#60;/em&#62; in the admin? If so, you can look at forms_model.php around line 798 for the function save_lead:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
public static function save_lead($form, &#38;amp;$lead){&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;That might give you some clues.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>octoberblue on "RG_LEAD_DETAIL table uniques"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/rg_lead_detail-table-uniques#post-149437</link>
			<pubDate>Mon, 18 Feb 2013 14:29:09 +0000</pubDate>
			<dc:creator>octoberblue</dc:creator>
			<guid isPermaLink="false">149437@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I've created an form that updates enteries of another form. I hook into the submission, and custom process it, updating the database with a query like such: &#60;a href=&#34;http://pastebin.com/cnp8P5HA&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/cnp8P5HA&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The problem is, with this query, if the original form did not create a new row (for instance if the field was empty), then this data is not updated (because it doesn't exisit to be update.)&#60;/p&#62;
&#60;p&#62;So I'm trying to come up with an elegant solution. I was thinking ON DUPLICATE KEY UPDATE might work, but the current database structure doesn't seem (in my limited sql experience) to jive with it as I need knowledge of the primary_key.&#60;/p&#62;
&#60;p&#62;Perhaps you have an idea, or perhaps you could show me where the code exists to update the exisiting form from the admin area.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "RG_LEAD_DETAIL table uniques"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/rg_lead_detail-table-uniques#post-149426</link>
			<pubDate>Mon, 18 Feb 2013 14:15:41 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">149426@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;There is no API really.  The best documentation for the plugin is the plugin files themselves.  If you can explain your use case, maybe we can come up with more ideas for you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>octoberblue on "RG_LEAD_DETAIL table uniques"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/rg_lead_detail-table-uniques#post-149421</link>
			<pubDate>Mon, 18 Feb 2013 14:08:49 +0000</pubDate>
			<dc:creator>octoberblue</dc:creator>
			<guid isPermaLink="false">149421@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Perfect. By the way, does gravity forms provide an API to update a set of these rows? (I'm trying to figure out how to update a set of these values and if it doesn't exist, create a new row.)&#60;/p&#62;
&#60;p&#62;...happy to just have you answer, &#34;we don't support that.&#34; Thanks for the help regarding my orginal question!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "RG_LEAD_DETAIL table uniques"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/rg_lead_detail-table-uniques#post-149417</link>
			<pubDate>Mon, 18 Feb 2013 14:06:17 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">149417@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yes, combined, those three fields can form a unique key.  For one form and one lead, there can only be one value stored for a field_number.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>octoberblue on "RG_LEAD_DETAIL table uniques"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/rg_lead_detail-table-uniques#post-149310</link>
			<pubDate>Mon, 18 Feb 2013 11:17:06 +0000</pubDate>
			<dc:creator>octoberblue</dc:creator>
			<guid isPermaLink="false">149310@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;In the wp_rg_lead_detail table, taken together are the three columns &#34;lead_id&#34;, &#34;form_id&#34;, and &#34;field_number&#34; always unique?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
