<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — Multiple SQL Updates]]></title>
		<link>https://punbb.informer.com/forums/topic/2574/multiple-sql-updates/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/2574/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Multiple SQL Updates.]]></description>
		<lastBuildDate>Sat, 30 Aug 2003 17:48:39 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Multiple SQL Updates]]></title>
			<link>https://punbb.informer.com/forums/post/4957/#p4957</link>
			<description><![CDATA[<p>Yeah, altho i only use $_ vars and require ppl to run updated software <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" />, i always terminate my if-else/switch-case with a default-block &quot;Error contact admin&quot; or something.</p><p>I think it&#039;s good code-practice to do so.</p>]]></description>
			<author><![CDATA[null@example.com (RNilsson)]]></author>
			<pubDate>Sat, 30 Aug 2003 17:48:39 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/4957/#p4957</guid>
		</item>
		<item>
			<title><![CDATA[Re: Multiple SQL Updates]]></title>
			<link>https://punbb.informer.com/forums/post/4945/#p4945</link>
			<description><![CDATA[<p>Yes. I also like the fact that is forces you to have an &quot;else&quot; block.</p><p>$is_admin = (is_admin($user)) ? true : false;</p><p>If it were a regular if, one could do:</p><p>if (is_admin($user))<br />&nbsp; &nbsp; $is_admin = true;</p><p>And &quot;forget&quot; about the false. Then someone forgets to turn off register_globals and anyone can do script.php?is_admin=1 and voila! A security hole :)</p><p>Edit: Ok, the above is a bad example since one would only have is_admin() return true or false, but you get the idea :)</p>]]></description>
			<author><![CDATA[null@example.com (Rickard)]]></author>
			<pubDate>Sat, 30 Aug 2003 13:51:41 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/4945/#p4945</guid>
		</item>
		<item>
			<title><![CDATA[Re: Multiple SQL Updates]]></title>
			<link>https://punbb.informer.com/forums/post/4943/#p4943</link>
			<description><![CDATA[<p>Ahh, yeah i see how that can be usable.<br />Is it speed/security/failsafewise as stable/good as an ordenary if-else-ladder?</p>]]></description>
			<author><![CDATA[null@example.com (RNilsson)]]></author>
			<pubDate>Sat, 30 Aug 2003 11:58:10 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/4943/#p4943</guid>
		</item>
		<item>
			<title><![CDATA[Re: Multiple SQL Updates]]></title>
			<link>https://punbb.informer.com/forums/post/4897/#p4897</link>
			<description><![CDATA[<p>It&#039;s the so called &quot;ternary operator&quot;.</p><p>print ($a &gt; 5) ? &#039;yes&#039; : &#039;no&#039;;</p><p>is the same as</p><p>if ($a &gt; 5)<br />&nbsp; &nbsp; print &#039;yes&#039;;<br />else<br />&nbsp; &nbsp; print &#039;no&#039;;</p>]]></description>
			<author><![CDATA[null@example.com (Rickard)]]></author>
			<pubDate>Fri, 29 Aug 2003 20:31:56 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/4897/#p4897</guid>
		</item>
		<item>
			<title><![CDATA[Re: Multiple SQL Updates]]></title>
			<link>https://punbb.informer.com/forums/post/4896/#p4896</link>
			<description><![CDATA[<p>Ahh, i c, you just loop through the arrays...<br />In the following line: $forums_to_process = (isset($_POST[&#039;update&#039;])) ? array_keys($_POST[&#039;update&#039;]) : array_keys($_POST[&#039;forum_name&#039;]);</p><p>What does the &#039;?&#039; and &#039;:&#039; do/mean?</p>]]></description>
			<author><![CDATA[null@example.com (RNilsson)]]></author>
			<pubDate>Fri, 29 Aug 2003 20:26:10 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/4896/#p4896</guid>
		</item>
		<item>
			<title><![CDATA[Re: Multiple SQL Updates]]></title>
			<link>https://punbb.informer.com/forums/post/4895/#p4895</link>
			<description><![CDATA[<p>Well, if you have a look at the source code, you can see that I run one SQL UPDATE for every forum. It&#039;s the only way of doing it.</p><p>Try adding dump($_POST); after the confirm_referer() row and then click &quot;Update All&quot;. It will display the contents of POST and then I think you will see how it&#039;s done.</p>]]></description>
			<author><![CDATA[null@example.com (Rickard)]]></author>
			<pubDate>Fri, 29 Aug 2003 20:13:25 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/4895/#p4895</guid>
		</item>
		<item>
			<title><![CDATA[Multiple SQL Updates]]></title>
			<link>https://punbb.informer.com/forums/post/4891/#p4891</link>
			<description><![CDATA[<p>Not really sure where to put his Q since it&#039;s a php-coding, sql-update Q from the category/forums section in the admin-area from pub <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>How have you solved the Update All-stuff when you update all forums/categories for among other things position etc?</p><p>Do you make one update/forum, or a multi-update directly (if it&#039;s possible)?</p>]]></description>
			<author><![CDATA[null@example.com (RNilsson)]]></author>
			<pubDate>Fri, 29 Aug 2003 19:49:36 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/4891/#p4891</guid>
		</item>
	</channel>
</rss>
