<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: Logic - Notification Email Rules Issue</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Logic - Notification Email Rules Issue</description>
<language>en</language>
<pubDate>Sun, 03 May 2026 20:38:35 +0000</pubDate>

<item>
<title>yuniar on "Logic - Notification Email Rules Issue"</title>
<link>https://www.machform.com/forums/topic/logic-notification-email-rules-issue#post-18294</link>
<pubDate>Thu, 16 May 2013 12:09:19 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">18294@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Omar -- thank you for reporting this!&#60;br /&#62;
I have the fix for this now and will update the package soon.&#60;/p&#62;
&#60;p&#62;If you need to get the patch, please contact me directly and I'll send you the files.
&#60;/p&#62;</description>
</item>
<item>
<title>orware on "Logic - Notification Email Rules Issue"</title>
<link>https://www.machform.com/forums/topic/logic-notification-email-rules-issue#post-18290</link>
<pubDate>Thu, 16 May 2013 02:10:49 +0000</pubDate>
<dc:creator>orware</dc:creator>
<guid isPermaLink="false">18290@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;So I just did some testing on my end with using a Dropdown Menu to guide which people get notified when a person submits something on our Contact Us form.&#60;/p&#62;
&#60;p&#62;One of the values for the Dropdown was &#34;President's Office&#34; (without the quotes).&#60;/p&#62;
&#60;p&#62;When setting up the Logic, I used:&#60;br /&#62;
&#34;Department You Wish to Contact: &#34; IS President's Office&#60;/p&#62;
&#60;p&#62;On the frontend, even though I didn't select that option from the Dropdown, I received a SQL error right after submitting the form. The data made it's way to the database and I did get the notification email, however, the SQL error below shouldn't be displayed on the page.&#60;/p&#62;
&#60;p&#62;SQL: [537] &#60;/p&#62;
&#60;p&#62;SELECT count(B.element_title) total_row&#60;br /&#62;
FROM( SELECT A.&#60;code&#62;element_6&#60;/code&#62;, (select &#60;code&#62;option&#60;/code&#62; from ap_element_options where form_id = ? and element_id = ? and option_id = A.element_6 and live = 1) element_title&#60;br /&#62;
	  FROM ap_form_105 A WHERE &#60;code&#62;id&#60;/code&#62; = ? ) B&#60;br /&#62;
WHERE B Params: &#60;/p&#62;
&#60;p&#62;3 Key: Position #0: paramno=0 name=[0] &#34;&#34; is_param=1 param_type=2 Key: Position #1: paramno=1 name=[0] &#34;&#34; is_param=1 param_type=2 Key: Position #2: paramno=2 name=[0] &#34;&#34;&#60;br /&#62;
is_param=1 param_type=2 &#60;/p&#62;
&#60;p&#62;Query Failed: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's office'' at line 21&#60;/p&#62;
&#60;p&#62;My guess is the value isn't being properly sanitized/quoted for that query and is causing a SQL error in that situation.&#60;/p&#62;
&#60;p&#62;I was able to resolve with a workaround by changing the logic for that one to be:&#60;br /&#62;
&#34;Department You Wish to Contact: &#34; BEGINS WITH President&#60;/p&#62;
&#60;p&#62;Instead.&#60;/p&#62;
&#60;p&#62;Hope this helps someone!&#60;/p&#62;
&#60;p&#62;-Omar
&#60;/p&#62;</description>
</item>

</channel>
</rss>
