<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/test/index.php?action=history&amp;feed=atom&amp;title=Development_talk%3ADB_layer_2.0_migration_docs</id>
	<title>Development talk:DB layer 2.0 migration docs - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/test/index.php?action=history&amp;feed=atom&amp;title=Development_talk%3ADB_layer_2.0_migration_docs"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;action=history"/>
	<updated>2026-04-18T00:58:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40569&amp;oldid=prev</id>
		<title>Stronk7: Development talk:dmllib 2.0 migration docs moved to Development talk:DB layer 2.0 migration docs</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40569&amp;oldid=prev"/>
		<updated>2008-07-25T17:14:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/test/Development_talk:dmllib_2.0_migration_docs&quot; class=&quot;mw-redirect&quot; title=&quot;Development talk:dmllib 2.0 migration docs&quot;&gt;Development talk:dmllib 2.0 migration docs&lt;/a&gt; moved to &lt;a href=&quot;/test/Development_talk:DB_layer_2.0_migration_docs&quot; title=&quot;Development talk:DB layer 2.0 migration docs&quot;&gt;Development talk:DB layer 2.0 migration docs&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:14, 25 July 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Stronk7</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40197&amp;oldid=prev</id>
		<title>Nicolasconnault: /* Why / when do we &#039;&#039;&#039;have&#039;&#039;&#039; to use the params array in the &quot;_sql&quot; functions? */</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40197&amp;oldid=prev"/>
		<updated>2008-07-22T03:26:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Why / when do we &amp;#039;&amp;#039;&amp;#039;have&amp;#039;&amp;#039;&amp;#039; to use the params array in the &amp;quot;_sql&amp;quot; functions?&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:26, 22 July 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l42&quot;&gt;Line 42:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:You must always use the params array WHEN you have params to pass ;) If the SQL doesn&amp;#039;t contain dynamic parameters (subject to SQL injection), we don&amp;#039;t need the params array. [[User:Nicolas Connault|Nicolas Connault]] 13:57, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:You must always use the params array WHEN you have params to pass ;) If the SQL doesn&amp;#039;t contain dynamic parameters (subject to SQL injection), we don&amp;#039;t need the params array. [[User:Nicolas Connault|Nicolas Connault]] 13:57, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:Aha! So the purpose is to help make sure that dynamic data used in SQL searches is cleansed? Is that correct? [[User:Mike Churchward|Mike Churchward]] 21:31, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:Aha! So the purpose is to help make sure that dynamic data used in SQL searches is cleansed? Is that correct? [[User:Mike Churchward|Mike Churchward]] 21:31, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;::Yes, and to get rid of the troublesome stripslashes().&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The new recordset handling seems odd. We used to use the &amp;quot;rs_fetch_next_record($rs)&amp;quot; function, which as I understood it was optimized so that the entire db records contents weren&amp;#039;t stored in the PHP array variable. Now we are replacing it with a &amp;quot;foreach ($rs as $record)&amp;quot;. Doesn&amp;#039;t that mean that the entire data query results are stored in a PHP variable again?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The new recordset handling seems odd. We used to use the &amp;quot;rs_fetch_next_record($rs)&amp;quot; function, which as I understood it was optimized so that the entire db records contents weren&amp;#039;t stored in the PHP array variable. Now we are replacing it with a &amp;quot;foreach ($rs as $record)&amp;quot;. Doesn&amp;#039;t that mean that the entire data query results are stored in a PHP variable again?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:The new recordset uses a new feature of PHP5, the Iterator interface. Foreach can then be used on the recordset. (See the bottom of [http://phplens.com/adodb/code.initialization.html the adodb doc] for more info). [[User:Nicolas Connault|Nicolas Connault]] 13:57, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:The new recordset uses a new feature of PHP5, the Iterator interface. Foreach can then be used on the recordset. (See the bottom of [http://phplens.com/adodb/code.initialization.html the adodb doc] for more info). [[User:Nicolas Connault|Nicolas Connault]] 13:57, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:Hmmm... Looks like I need to spend some time learning PHP5&amp;#039;s features. So, in PHP5, the &amp;quot;foreach&amp;quot; construct unlocks a classes&amp;#039; interator functions if they exist? [[User:Mike Churchward|Mike Churchward]] 21:31, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:Hmmm... Looks like I need to spend some time learning PHP5&amp;#039;s features. So, in PHP5, the &amp;quot;foreach&amp;quot; construct unlocks a classes&amp;#039; interator functions if they exist? [[User:Mike Churchward|Mike Churchward]] 21:31, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;::Correct &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;on both counts &lt;/del&gt;:) [[User:Nicolas Connault|Nicolas Connault]] 22:24, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;::Correct :) [[User:Nicolas Connault|Nicolas Connault]] 22:24, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nicolasconnault</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40196&amp;oldid=prev</id>
		<title>Nicolasconnault: Answering Mike</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40196&amp;oldid=prev"/>
		<updated>2008-07-22T03:24:53Z</updated>

		<summary type="html">&lt;p&gt;Answering Mike&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:24, 22 July 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l45&quot;&gt;Line 45:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 45:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:The new recordset uses a new feature of PHP5, the Iterator interface. Foreach can then be used on the recordset. (See the bottom of [http://phplens.com/adodb/code.initialization.html the adodb doc] for more info). [[User:Nicolas Connault|Nicolas Connault]] 13:57, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:The new recordset uses a new feature of PHP5, the Iterator interface. Foreach can then be used on the recordset. (See the bottom of [http://phplens.com/adodb/code.initialization.html the adodb doc] for more info). [[User:Nicolas Connault|Nicolas Connault]] 13:57, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:Hmmm... Looks like I need to spend some time learning PHP5&amp;#039;s features. So, in PHP5, the &amp;quot;foreach&amp;quot; construct unlocks a classes&amp;#039; interator functions if they exist? [[User:Mike Churchward|Mike Churchward]] 21:31, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:Hmmm... Looks like I need to spend some time learning PHP5&amp;#039;s features. So, in PHP5, the &amp;quot;foreach&amp;quot; construct unlocks a classes&amp;#039; interator functions if they exist? [[User:Mike Churchward|Mike Churchward]] 21:31, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;::Correct on both counts :) [[User:Nicolas Connault|Nicolas Connault]] 22:24, 21 July 2008 (CDT)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nicolasconnault</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40195&amp;oldid=prev</id>
		<title>Mchurch: /* Why / when do we &#039;&#039;&#039;have&#039;&#039;&#039; to use the params array in the &quot;_sql&quot; functions? */</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40195&amp;oldid=prev"/>
		<updated>2008-07-22T02:32:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Why / when do we &amp;#039;&amp;#039;&amp;#039;have&amp;#039;&amp;#039;&amp;#039; to use the params array in the &amp;quot;_sql&amp;quot; functions?&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:32, 22 July 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l41&quot;&gt;Line 41:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 41:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# I&amp;#039;m not sure I&amp;#039;m clear on what the advantages are in using the &amp;quot;params&amp;quot; array for the &amp;quot;*_sql&amp;quot; functions (e.g. get_records_sql). Also, the text says we &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; do it, but I see lots of examples in the already converted code where this hasn&amp;#039;t been done. Is it really a &amp;#039;&amp;#039;&amp;#039;must do&amp;#039;&amp;#039;&amp;#039; or is it more of a &amp;#039;&amp;#039;&amp;#039;can do&amp;#039;&amp;#039;&amp;#039;?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# I&amp;#039;m not sure I&amp;#039;m clear on what the advantages are in using the &amp;quot;params&amp;quot; array for the &amp;quot;*_sql&amp;quot; functions (e.g. get_records_sql). Also, the text says we &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; do it, but I see lots of examples in the already converted code where this hasn&amp;#039;t been done. Is it really a &amp;#039;&amp;#039;&amp;#039;must do&amp;#039;&amp;#039;&amp;#039; or is it more of a &amp;#039;&amp;#039;&amp;#039;can do&amp;#039;&amp;#039;&amp;#039;?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:You must always use the params array WHEN you have params to pass ;) If the SQL doesn&amp;#039;t contain dynamic parameters (subject to SQL injection), we don&amp;#039;t need the params array. [[User:Nicolas Connault|Nicolas Connault]] 13:57, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:You must always use the params array WHEN you have params to pass ;) If the SQL doesn&amp;#039;t contain dynamic parameters (subject to SQL injection), we don&amp;#039;t need the params array. [[User:Nicolas Connault|Nicolas Connault]] 13:57, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:Aha! So the purpose is to help make sure that dynamic data used in SQL searches is cleansed? Is that correct?[[User:Mike Churchward|Mike Churchward]] 21:31, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:Aha! So the purpose is to help make sure that dynamic data used in SQL searches is cleansed? Is that correct? [[User:Mike Churchward|Mike Churchward]] 21:31, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The new recordset handling seems odd. We used to use the &amp;quot;rs_fetch_next_record($rs)&amp;quot; function, which as I understood it was optimized so that the entire db records contents weren&amp;#039;t stored in the PHP array variable. Now we are replacing it with a &amp;quot;foreach ($rs as $record)&amp;quot;. Doesn&amp;#039;t that mean that the entire data query results are stored in a PHP variable again?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The new recordset handling seems odd. We used to use the &amp;quot;rs_fetch_next_record($rs)&amp;quot; function, which as I understood it was optimized so that the entire db records contents weren&amp;#039;t stored in the PHP array variable. Now we are replacing it with a &amp;quot;foreach ($rs as $record)&amp;quot;. Doesn&amp;#039;t that mean that the entire data query results are stored in a PHP variable again?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:The new recordset uses a new feature of PHP5, the Iterator interface. Foreach can then be used on the recordset. (See the bottom of [http://phplens.com/adodb/code.initialization.html the adodb doc] for more info). [[User:Nicolas Connault|Nicolas Connault]] 13:57, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:The new recordset uses a new feature of PHP5, the Iterator interface. Foreach can then be used on the recordset. (See the bottom of [http://phplens.com/adodb/code.initialization.html the adodb doc] for more info). [[User:Nicolas Connault|Nicolas Connault]] 13:57, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:Hmmm... Looks like I need to spend some time learning PHP5&#039;s features. So, in PHP5, the &quot;foreach&quot; construct unlocks a classes&#039; interator functions if they exist?[[User:Mike Churchward|Mike Churchward]] 21:31, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:Hmmm... Looks like I need to spend some time learning PHP5&#039;s features. So, in PHP5, the &quot;foreach&quot; construct unlocks a classes&#039; interator functions if they exist? [[User:Mike Churchward|Mike Churchward]] 21:31, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mchurch</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40194&amp;oldid=prev</id>
		<title>Mchurch: /* Why / when do we &#039;&#039;&#039;have&#039;&#039;&#039; to use the params array in the &quot;_sql&quot; functions? */</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40194&amp;oldid=prev"/>
		<updated>2008-07-22T02:31:37Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Why / when do we &amp;#039;&amp;#039;&amp;#039;have&amp;#039;&amp;#039;&amp;#039; to use the params array in the &amp;quot;_sql&amp;quot; functions?&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:31, 22 July 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l41&quot;&gt;Line 41:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 41:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# I&amp;#039;m not sure I&amp;#039;m clear on what the advantages are in using the &amp;quot;params&amp;quot; array for the &amp;quot;*_sql&amp;quot; functions (e.g. get_records_sql). Also, the text says we &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; do it, but I see lots of examples in the already converted code where this hasn&amp;#039;t been done. Is it really a &amp;#039;&amp;#039;&amp;#039;must do&amp;#039;&amp;#039;&amp;#039; or is it more of a &amp;#039;&amp;#039;&amp;#039;can do&amp;#039;&amp;#039;&amp;#039;?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# I&amp;#039;m not sure I&amp;#039;m clear on what the advantages are in using the &amp;quot;params&amp;quot; array for the &amp;quot;*_sql&amp;quot; functions (e.g. get_records_sql). Also, the text says we &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; do it, but I see lots of examples in the already converted code where this hasn&amp;#039;t been done. Is it really a &amp;#039;&amp;#039;&amp;#039;must do&amp;#039;&amp;#039;&amp;#039; or is it more of a &amp;#039;&amp;#039;&amp;#039;can do&amp;#039;&amp;#039;&amp;#039;?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:You must always use the params array WHEN you have params to pass ;) If the SQL doesn&amp;#039;t contain dynamic parameters (subject to SQL injection), we don&amp;#039;t need the params array. [[User:Nicolas Connault|Nicolas Connault]] 13:57, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:You must always use the params array WHEN you have params to pass ;) If the SQL doesn&amp;#039;t contain dynamic parameters (subject to SQL injection), we don&amp;#039;t need the params array. [[User:Nicolas Connault|Nicolas Connault]] 13:57, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:Aha! So the purpose is to help make sure that dynamic data used in SQL searches is cleansed? Is that correct?[[User:Mike Churchward|Mike Churchward]] 21:31, 21 July 2008 (CDT)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The new recordset handling seems odd. We used to use the &amp;quot;rs_fetch_next_record($rs)&amp;quot; function, which as I understood it was optimized so that the entire db records contents weren&amp;#039;t stored in the PHP array variable. Now we are replacing it with a &amp;quot;foreach ($rs as $record)&amp;quot;. Doesn&amp;#039;t that mean that the entire data query results are stored in a PHP variable again?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The new recordset handling seems odd. We used to use the &amp;quot;rs_fetch_next_record($rs)&amp;quot; function, which as I understood it was optimized so that the entire db records contents weren&amp;#039;t stored in the PHP array variable. Now we are replacing it with a &amp;quot;foreach ($rs as $record)&amp;quot;. Doesn&amp;#039;t that mean that the entire data query results are stored in a PHP variable again?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:The new recordset uses a new feature of PHP5, the Iterator interface. Foreach can then be used on the recordset. (See the bottom of [http://phplens.com/adodb/code.initialization.html the adodb doc] for more info). [[User:Nicolas Connault|Nicolas Connault]] 13:57, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:The new recordset uses a new feature of PHP5, the Iterator interface. Foreach can then be used on the recordset. (See the bottom of [http://phplens.com/adodb/code.initialization.html the adodb doc] for more info). [[User:Nicolas Connault|Nicolas Connault]] 13:57, 21 July 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:Hmmm... Looks like I need to spend some time learning PHP5&#039;s features. So, in PHP5, the &quot;foreach&quot; construct unlocks a classes&#039; interator functions if they exist?[[User:Mike Churchward|Mike Churchward]] 21:31, 21 July 2008 (CDT)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mchurch</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40177&amp;oldid=prev</id>
		<title>Nicolasconnault: Answers to Sam&#039;s pertinent questions</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40177&amp;oldid=prev"/>
		<updated>2008-07-21T18:57:20Z</updated>

		<summary type="html">&lt;p&gt;Answers to Sam&amp;#039;s pertinent questions&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:57, 21 July 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l40&quot;&gt;Line 40:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 40:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# I&amp;#039;m not sure I&amp;#039;m clear on what the advantages are in using the &amp;quot;params&amp;quot; array for the &amp;quot;*_sql&amp;quot; functions (e.g. get_records_sql). Also, the text says we &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; do it, but I see lots of examples in the already converted code where this hasn&amp;#039;t been done. Is it really a &amp;#039;&amp;#039;&amp;#039;must do&amp;#039;&amp;#039;&amp;#039; or is it more of a &amp;#039;&amp;#039;&amp;#039;can do&amp;#039;&amp;#039;&amp;#039;?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# I&amp;#039;m not sure I&amp;#039;m clear on what the advantages are in using the &amp;quot;params&amp;quot; array for the &amp;quot;*_sql&amp;quot; functions (e.g. get_records_sql). Also, the text says we &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; do it, but I see lots of examples in the already converted code where this hasn&amp;#039;t been done. Is it really a &amp;#039;&amp;#039;&amp;#039;must do&amp;#039;&amp;#039;&amp;#039; or is it more of a &amp;#039;&amp;#039;&amp;#039;can do&amp;#039;&amp;#039;&amp;#039;?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:You must always use the params array WHEN you have params to pass ;) If the SQL doesn&#039;t contain dynamic parameters (subject to SQL injection), we don&#039;t need the params array. [[User:Nicolas Connault|Nicolas Connault]] 13:57, 21 July 2008 (CDT)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The new recordset handling seems odd. We used to use the &amp;quot;rs_fetch_next_record($rs)&amp;quot; function, which as I understood it was optimized so that the entire db records contents weren&amp;#039;t stored in the PHP array variable. Now we are replacing it with a &amp;quot;foreach ($rs as $record)&amp;quot;. Doesn&amp;#039;t that mean that the entire data query results are stored in a PHP variable again?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The new recordset handling seems odd. We used to use the &amp;quot;rs_fetch_next_record($rs)&amp;quot; function, which as I understood it was optimized so that the entire db records contents weren&amp;#039;t stored in the PHP array variable. Now we are replacing it with a &amp;quot;foreach ($rs as $record)&amp;quot;. Doesn&amp;#039;t that mean that the entire data query results are stored in a PHP variable again?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:The new recordset uses a new feature of PHP5, the Iterator interface. Foreach can then be used on the recordset. (See the bottom of [http://phplens.com/adodb/code.initialization.html the adodb doc] for more info). [[User:Nicolas Connault|Nicolas Connault]] 13:57, 21 July 2008 (CDT)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nicolasconnault</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40175&amp;oldid=prev</id>
		<title>Mchurch: /* Why / when do we &#039;&#039;&#039;have&#039;&#039;&#039; to use the params array in the &quot;_sql&quot; functions? */</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40175&amp;oldid=prev"/>
		<updated>2008-07-21T18:31:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Why / when do we &amp;#039;&amp;#039;&amp;#039;have&amp;#039;&amp;#039;&amp;#039; to use the params array in the &amp;quot;_sql&amp;quot; functions?&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:31, 21 July 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l40&quot;&gt;Line 40:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 40:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# I&amp;#039;m not sure I&amp;#039;m clear on what the advantages are in using the &amp;quot;params&amp;quot; array for the &amp;quot;*_sql&amp;quot; functions (e.g. get_records_sql). Also, the text says we &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; do it, but I see lots of examples in the already converted code where this hasn&amp;#039;t been done. Is it really a &amp;#039;&amp;#039;&amp;#039;must do&amp;#039;&amp;#039;&amp;#039; or is it more of a &amp;#039;&amp;#039;&amp;#039;can do&amp;#039;&amp;#039;&amp;#039;?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# I&amp;#039;m not sure I&amp;#039;m clear on what the advantages are in using the &amp;quot;params&amp;quot; array for the &amp;quot;*_sql&amp;quot; functions (e.g. get_records_sql). Also, the text says we &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; do it, but I see lots of examples in the already converted code where this hasn&amp;#039;t been done. Is it really a &amp;#039;&amp;#039;&amp;#039;must do&amp;#039;&amp;#039;&amp;#039; or is it more of a &amp;#039;&amp;#039;&amp;#039;can do&amp;#039;&amp;#039;&amp;#039;?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The new recordset handling seems odd. We used to use the &amp;quot;rs_fetch_next_record($rs)&amp;quot; function, which as I understood it was optimized so that the entire db records contents weren&amp;#039;t stored in the PHP array variable. Now we are replacing it with a &amp;quot;foreach ($rs as $record)&amp;quot;. Doesn&amp;#039;t that mean that the entire data query results are stored in a PHP variable again?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The new recordset handling seems odd. We used to use the &amp;quot;rs_fetch_next_record($rs)&amp;quot; function, which as I understood it was optimized so that the entire db records contents weren&amp;#039;t stored in the PHP array variable. Now we are replacing it with a &amp;quot;foreach ($rs as $record)&amp;quot;. Doesn&amp;#039;t that mean that the entire data query results are stored in a PHP variable again?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mchurch</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40174&amp;oldid=prev</id>
		<title>Mchurch: /* Why / when do we &#039;&#039;&#039;have&#039;&#039;&#039; to use the params array in the &quot;_sql&quot; functions? */</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40174&amp;oldid=prev"/>
		<updated>2008-07-21T18:30:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Why / when do we &amp;#039;&amp;#039;&amp;#039;have&amp;#039;&amp;#039;&amp;#039; to use the params array in the &amp;quot;_sql&amp;quot; functions?&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:30, 21 July 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l39&quot;&gt;Line 39:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 39:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Why / when do we &amp;#039;&amp;#039;&amp;#039;have&amp;#039;&amp;#039;&amp;#039; to use the params array in the &amp;quot;_sql&amp;quot; functions? ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Why / when do we &amp;#039;&amp;#039;&amp;#039;have&amp;#039;&amp;#039;&amp;#039; to use the params array in the &amp;quot;_sql&amp;quot; functions? ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1. &lt;/del&gt;I&#039;m not sure I&#039;m clear on what the advantages are in using the &quot;params&quot; array for the &quot;*_sql&quot; functions (e.g. get_records_sql). Also, the text says we &#039;&#039;&#039;must&#039;&#039;&#039; do it, but I see lots of examples in the already converted code where this hasn&#039;t been done. Is it really a &#039;&#039;&#039;must do&#039;&#039;&#039; or is it more of a &#039;&#039;&#039;can do&#039;&#039;&#039;?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &lt;/ins&gt;I&#039;m not sure I&#039;m clear on what the advantages are in using the &quot;params&quot; array for the &quot;*_sql&quot; functions (e.g. get_records_sql). Also, the text says we &#039;&#039;&#039;must&#039;&#039;&#039; do it, but I see lots of examples in the already converted code where this hasn&#039;t been done. Is it really a &#039;&#039;&#039;must do&#039;&#039;&#039; or is it more of a &#039;&#039;&#039;can do&#039;&#039;&#039;?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2. &lt;/del&gt;The new recordset handling seems odd. We used to use the &quot;rs_fetch_next_record($rs)&quot; function, which as I understood it was optimized so that the entire db records contents weren&#039;t stored in the PHP array variable. Now we are replacing it with a &quot;foreach ($rs as $record)&quot;. Doesn&#039;t that mean that the entire data query results are stored in a PHP variable again?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# &lt;/ins&gt;The new recordset handling seems odd. We used to use the &quot;rs_fetch_next_record($rs)&quot; function, which as I understood it was optimized so that the entire db records contents weren&#039;t stored in the PHP array variable. Now we are replacing it with a &quot;foreach ($rs as $record)&quot;. Doesn&#039;t that mean that the entire data query results are stored in a PHP variable again?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mchurch</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40173&amp;oldid=prev</id>
		<title>Mchurch: /* Why / when do we &#039;&#039;&#039;have&#039;&#039;&#039; to use the params array in the &quot;_sql&quot; functions? */</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40173&amp;oldid=prev"/>
		<updated>2008-07-21T18:29:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Why / when do we &amp;#039;&amp;#039;&amp;#039;have&amp;#039;&amp;#039;&amp;#039; to use the params array in the &amp;quot;_sql&amp;quot; functions?&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:29, 21 July 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l39&quot;&gt;Line 39:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 39:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Why / when do we &amp;#039;&amp;#039;&amp;#039;have&amp;#039;&amp;#039;&amp;#039; to use the params array in the &amp;quot;_sql&amp;quot; functions? ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Why / when do we &amp;#039;&amp;#039;&amp;#039;have&amp;#039;&amp;#039;&amp;#039; to use the params array in the &amp;quot;_sql&amp;quot; functions? ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I&#039;m not sure I&#039;m clear on what the advantages are in using the &quot;params&quot; array for the &quot;*_sql&quot; functions (e.g. get_records_sql). Also, the text says we &#039;&#039;&#039;must&#039;&#039;&#039; do it, but I see lots of examples in the already converted code where this hasn&#039;t been done. Is it really a &#039;&#039;&#039;must do&#039;&#039;&#039; or is it more of a &#039;&#039;&#039;can do&#039;&#039;&#039;?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1. &lt;/ins&gt;I&#039;m not sure I&#039;m clear on what the advantages are in using the &quot;params&quot; array for the &quot;*_sql&quot; functions (e.g. get_records_sql). Also, the text says we &#039;&#039;&#039;must&#039;&#039;&#039; do it, but I see lots of examples in the already converted code where this hasn&#039;t been done. Is it really a &#039;&#039;&#039;must do&#039;&#039;&#039; or is it more of a &#039;&#039;&#039;can do&#039;&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;?&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2. The new recordset handling seems odd. We used to use the &quot;rs_fetch_next_record($rs)&quot; function, which as I understood it was optimized so that the entire db records contents weren&#039;t stored in the PHP array variable. Now we are replacing it with a &quot;foreach ($rs as $record)&quot;. Doesn&#039;t that mean that the entire data query results are stored in a PHP variable again&lt;/ins&gt;?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mchurch</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40172&amp;oldid=prev</id>
		<title>Mchurch: /* Why / when do we *have* to use the params array in the &quot;_sql&quot; functions? */</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Development_talk:DB_layer_2.0_migration_docs&amp;diff=40172&amp;oldid=prev"/>
		<updated>2008-07-21T18:10:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Why / when do we *have* to use the params array in the &amp;quot;_sql&amp;quot; functions?&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:10, 21 July 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l37&quot;&gt;Line 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[User:sam marshall|sam marshall]] 04:32, 3 June 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[User:sam marshall|sam marshall]] 04:32, 3 June 2008 (CDT)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Why / when do we &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*&lt;/del&gt;have&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/del&gt;to use the params array in the &quot;_sql&quot; functions? ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Why / when do we &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;&lt;/ins&gt;have&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039; &lt;/ins&gt;to use the params array in the &quot;_sql&quot; functions? ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I&#039;m not sure I&#039;m clear on what the advantages are in using the &quot;params&quot; array for the &quot;*_sql&quot; functions (e.g. get_records_sql). Also, the text says we &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*&lt;/del&gt;must&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/del&gt;do it, but I see lots of examples in the already converted code where this hasn&#039;t been done. Is it really a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*&lt;/del&gt;must do&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/del&gt;or is it more of a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*&lt;/del&gt;can do&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*&lt;/del&gt;?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I&#039;m not sure I&#039;m clear on what the advantages are in using the &quot;params&quot; array for the &quot;*_sql&quot; functions (e.g. get_records_sql). Also, the text says we &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;&lt;/ins&gt;must&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039; &lt;/ins&gt;do it, but I see lots of examples in the already converted code where this hasn&#039;t been done. Is it really a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;&lt;/ins&gt;must do&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039; &lt;/ins&gt;or is it more of a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;&lt;/ins&gt;can do&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;&lt;/ins&gt;?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mchurch</name></author>
	</entry>
</feed>