<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1025547" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1025547</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/database-results-array#comment-1155876</link>
    <description> &lt;p&gt;I&#039;m not entirely clear about the problem here.&lt;/p&gt;
&lt;p&gt;should be something like this.  I can&#039;t give you my exact codes here since I lost it  &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/tongue.png&quot; title=&quot;Sticking out tongue&quot; alt=&quot;Sticking out tongue&quot; class=&quot;smiley-content&quot; /&gt; &lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;GetResults&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$connection &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;CreateConnection&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(); &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// this is a a function i made to for my database connection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$QueryString &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;SELECT .....\&quot;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$ResultSet&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_query(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$QueryString&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$connection&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) or die(&#039;Cannot update session&#039;);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$ResultSet&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$ArrayVariable&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = GetResults();&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Hope that helps.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;
John&lt;br /&gt;
Website District&lt;br /&gt;
&lt;a href=&quot;http://www.websitedistrict.net&quot; class=&quot;bb-url&quot;&gt;http://www.websitedistrict.net&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Fri, 30 Jul 2004 02:20:11 +0000</pubDate>
 <dc:creator>WebsiteDistrict</dc:creator>
 <guid isPermaLink="false">comment 1155876 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/database-results-array#comment-1155236</link>
    <description> &lt;p&gt;Not sure how to so it in php but i know it can be done, you can get the column list in SQL then select * and use the column list for your loop&lt;/p&gt;
&lt;p&gt;I don&#039;t use php so this will be kinda vague, you will have to check out MySQL documentation, but it would work like so:&lt;/p&gt;
&lt;p&gt;Select * from vartable .....&lt;br /&gt;
while($row = mysql_fetch_array($result))&lt;br /&gt;
{&lt;/p&gt;
&lt;p&gt;if($row[$AAA] != &#039;&#039;){&lt;br /&gt;
update another database table set $AAA to stuff&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;this is only concept of course - im a coldfusion programmer (background in perl) i never reallly got into php, but that general idea should work the same in php... &lt;/p&gt;
&lt;p&gt;well maybe it will give you an idea anyway - &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/plain.png&quot; title=&quot;Plain&quot; alt=&quot;Plain&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Fri, 16 Jul 2004 05:07:56 +0000</pubDate>
 <dc:creator>vexcom</dc:creator>
 <guid isPermaLink="false">comment 1155236 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/database-results-array#comment-1155227</link>
    <description> &lt;p&gt;I think I understand, but if that&#039;s going to be happening a lot you might be better to read the images into the database when they are uploaded, and have a lookup table for what post uses what image. When the post is gone, the image is deleted as well, or alternatively you could check the dates on the images with a cron job and prune from there?&lt;/p&gt;
 </description>
     <pubDate>Fri, 16 Jul 2004 03:23:51 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1155227 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/database-results-array#comment-1155219</link>
    <description> &lt;p&gt;Sorry, &quot;in use&quot; or &quot;not in use&quot;&lt;/p&gt;
&lt;p&gt;Example:&lt;br /&gt;
Say this forum allows us to upload 10 images for things, if the image is used in a post it is  marked &quot;in use&quot; but if the image isn&#039;t being used (could be from never been used, post removed, edited ...) then shows &quot;not in use&quot;. Thats the basic idea of it, it&#039;s more complex as I also use time for auto removal, and hiding etc which isnt needed for this section of code. &lt;/p&gt;
&lt;p&gt;It&#039;s not really a big part of the site, just something to help keep some sanity on my part so can keep track of who, what when and sometimes why &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The method I am playing with at the moment is opposite to what I posted above, am working with a join to find the images in use and setting them to &quot;in use&quot;. It&#039;s three queries less per set.&lt;br /&gt;
Just found EXPLAIN so am changing stuff to suit.&lt;/p&gt;
 </description>
     <pubDate>Fri, 16 Jul 2004 00:18:00 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1155219 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/database-results-array#comment-1155211</link>
    <description> &lt;p&gt;by &quot;used&quot; what do you mean? (I feel really dense, I&#039;m sorry, but I don&#039;t understand why you need to data mine to get this information?)&lt;/p&gt;
 </description>
     <pubDate>Thu, 15 Jul 2004 22:40:19 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1155211 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/database-results-array#comment-1155209</link>
    <description> &lt;p&gt;The first query takes all the images used in posts, the second updates them to &quot;being used&quot; or &quot;not used&quot; depending on the results.&lt;/p&gt;
&lt;p&gt;Ideally there shouldn&#039;t be any doubles but it happens.&lt;/p&gt;
&lt;p&gt;I have another part of this script which actually removes the images after 30  days of no use but it too is causing some problems as it&#039;s creating an overhead in phpmyadmin which needs repair or optimise to osrt it out. There is also a third part to it (all parts are in different places) that is fine.&lt;/p&gt;
 </description>
     <pubDate>Thu, 15 Jul 2004 21:31:47 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1155209 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/database-results-array#comment-1155200</link>
    <description> &lt;p&gt;This is probably very obvious to you, but what are you updating, exactly? I haven&#039;t been following along.&lt;/p&gt;
 </description>
     <pubDate>Thu, 15 Jul 2004 20:04:24 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1155200 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
