<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarcrm.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Use of prepared statements in Sugar 7.9</title><link>/dev-club/b/dev-blog/posts/use-of-prepared-statements-in-sugar-7-9</link><description>What are Prepared Statements? Prepared Statements , also known as parameterized statements, is a database feature that allows the same or similar queries to be executed with more efficiency and greater security. It has also been a common Sugar pl...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Use of prepared statements in Sugar 7.9</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/use-of-prepared-statements-in-sugar-7-9</link><pubDate>Fri, 05 Nov 2021 20:34:33 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:c4204905-ef5e-4ec4-b9ab-cabbc6b539c9</guid><dc:creator>Enes Saridogan</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hello [mention:55684fd1b8674ea2961f0e7ada0dbb91:e9ed411860ed4f2ba0265705b8793d05]&lt;/p&gt;
&lt;p&gt;Thanks for this article. I want to use the updateParams function, but it doesn&amp;#39;t work on custom fields for custom tables, for example I want to update a field named status_proc_c on the table cases_cstm, but after debugging I noticed that the field isn&amp;#39;t considered because it has the key source and it is not of type db :&lt;/p&gt;
&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:2799030e-d33f-4bfe-9006-15925245afc2:type=php&amp;text=if%20%28isset%28%24fieldDef%5B%27source%27%5D%29%20%26%26%20%24fieldDef%5B%27source%27%5D%20%21%3D%20%27db%27%29%20%7B%0D%0A%20%20%20%20continue%3B%0D%0A%7D]&lt;/p&gt;
&lt;p&gt;Here is the code I tried to execute :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:c1b2bcb9-5b51-426d-ad83-2a6128784492:type=php&amp;text=global%20%24db%3B%0D%0A%24fieldDefs%20%3D%20%24GLOBALS%5B%27dictionary%27%5D%5B%27Case%27%5D%5B%27fields%27%5D%3B%0D%0A%24db_return%20%3D%20%24db-%3EupdateParams%28%27cases_cstm%27%2C%20%0D%0A%09%24fieldDefs%2C%20%0D%0A%09array%28%0D%0A%09%09%27status_proc_c%27%20%3D%3E%20%27status_proc_refused%27%0D%0A%09%29%2C%0D%0A%09array%28%0D%0A%09%09%27id_c%27%20%3D%3E%20%24taskBean-%3Eparent_id%2C%0D%0A%09%29%0D%0A%29%3B]&lt;/p&gt;
&lt;p&gt;Is there a way to bypass that ? That&amp;#39;s a pity if we can only set the values for the principle table.&lt;/p&gt;
&lt;p&gt;Thanks in advance for your feedback !&lt;/p&gt;
&lt;p&gt;Have a nice week end ! :-)&lt;/p&gt;
&lt;p&gt;Enes&lt;/p&gt;&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=808&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Use of prepared statements in Sugar 7.9</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/use-of-prepared-statements-in-sugar-7-9</link><pubDate>Tue, 27 Jun 2017 09:16:47 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:c4204905-ef5e-4ec4-b9ab-cabbc6b539c9</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>1</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by Ivan Tabarino.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;I would like to know which one is the recommended form to create new custom queries on Sugar 7.9. Would be better to call directly Doctrine/QueryBuilder or SugarQuery?&lt;/span&gt;&lt;p&gt;Thank you.&lt;/p&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=808&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Use of prepared statements in Sugar 7.9</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/use-of-prepared-statements-in-sugar-7-9</link><pubDate>Sat, 06 May 2017 02:23:02 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:c4204905-ef5e-4ec4-b9ab-cabbc6b539c9</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>1</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by Basu Ramanan.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;thank you. This was a much-awaited feature in the out-of-the-box product. &lt;/span&gt;&lt;p&gt;1. Would Sugar now generate only prepared Statements out of the box for all SQLs?&lt;/p&gt;&lt;p&gt;2. Can this be configurable ?&lt;/p&gt;&lt;p&gt;3. For Debug purposes, Is there a way to log the Actual bind params passed in ?&lt;/p&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=808&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Use of prepared statements in Sugar 7.9</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/use-of-prepared-statements-in-sugar-7-9</link><pubDate>Sat, 22 Apr 2017 15:28:07 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:c4204905-ef5e-4ec4-b9ab-cabbc6b539c9</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>1</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by Albert Trotter.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;hello! please guide us all about the delete queries too&lt;/span&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=808&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Use of prepared statements in Sugar 7.9</title><link>https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/use-of-prepared-statements-in-sugar-7-9</link><pubDate>Mon, 17 Apr 2017 13:52:24 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:c4204905-ef5e-4ec4-b9ab-cabbc6b539c9</guid><dc:creator>SugarCRM Developers</dc:creator><slash:comments>1</slash:comments><description>
&lt;p&gt;&lt;i&gt;Comment originally made by Bruno Smith Lopes Ribeiro.&lt;/i&gt;&lt;/p&gt;&lt;span&gt;Hi Matt,&lt;/span&gt;&lt;p&gt;I&amp;#39;ve seen that will be removed from the &amp;quot;joinRaw&amp;quot; in SugarQuery, could you provide an example of how to use LEFT JOIN without it? I want to anticipate myself because I use it a lot.&lt;/p&gt;&lt;p&gt;Thank you.&lt;/p&gt;
&lt;img src="https://sugarclub.sugarcrm.com/aggbug?PostID=808&amp;AppID=56&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>