<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1040776" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1040776</link>
    <description></description>
    <language>en</language>
          <item>
    <title>pr0gr4mm3r&#039;s advice is good</title>
    <link>https://www.webmaster-forums.net/web-database-development/multiple-entries-one-field#comment-1228919</link>
    <description> &lt;p&gt;pr0gr4mm3r&#039;s advice is good (just storing two id&#039;s won&#039;t use much space anyway). However, just for future reference, you can store multiple values in a single field using &lt;a href=&quot;http://ca.php.net/manual/en/function.serialize.php&quot;&gt;serialise&lt;/a&gt;. This is good for doing multi-page forms, it should be avoided for storing things in a database though. Data processing in PHP is slower than a database, and it makes it harder to transfer data to new software.&lt;/p&gt;
 </description>
     <pubDate>Sun, 02 Mar 2008 22:16:07 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1228919 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Quote:

But didn&#039;t call the</title>
    <link>https://www.webmaster-forums.net/web-database-development/multiple-entries-one-field#comment-1228913</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: But didn&#039;t call the table name after a wild animal  &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/confused.png&quot; title=&quot;Confused&quot; alt=&quot;Confused&quot; class=&quot;smiley-content&quot; /&gt; &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I was confused on that as well.  Probably an inside hoke or something.&lt;/p&gt;
&lt;p&gt;Glad to help.  &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;
 </description>
     <pubDate>Sun, 02 Mar 2008 19:42:01 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1228913 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>thank for the advice. I&#039;ve</title>
    <link>https://www.webmaster-forums.net/web-database-development/multiple-entries-one-field#comment-1228912</link>
    <description> &lt;p&gt;thank for the advice. I&#039;ve made it so for each user a member blocks a single row is created. I will limit members to 50 pm&#039;s anyway, so it shouldn&#039;t be too bad.&lt;br /&gt;
But didn&#039;t call the table name after a wild animal  &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/confused.png&quot; title=&quot;Confused&quot; alt=&quot;Confused&quot; class=&quot;smiley-content&quot; /&gt; &lt;/p&gt;
&lt;p&gt;Now I just have to battle through all the if/elseifs &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/grin.png&quot; title=&quot;Laugh&quot; alt=&quot;Laugh&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
 </description>
     <pubDate>Sun, 02 Mar 2008 16:54:44 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1228912 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>$_SESSION wouldn&#039;t be a bad</title>
    <link>https://www.webmaster-forums.net/web-database-development/multiple-entries-one-field#comment-1228903</link>
    <description> &lt;p&gt;$_SESSION wouldn&#039;t be a bad way to do it as far as I know.  5,000 chars will be a little more than 5k of memory - not a big deal.  Just clear it when the form is submitted.&lt;/p&gt;
&lt;p&gt;Yes, blocking 20 people would create 20 rows, but that&#039;s how you do it if you follow &lt;a href=&quot;http://en.wikipedia.org/wiki/Database_normalization&quot; class=&quot;bb-url&quot;&gt;database normalization&lt;/a&gt;.  Selecting 20 rows from a DB of only a couple rows of member ids is nothing.  If you feel that there will be some performance issues, you can look into query caching, but I wouldn&#039;t store them in flat files.  Databases are made to be queried, files are not.&lt;/p&gt;
&lt;p&gt;phpBB has a table that contains the ids of both profiles and marks whether they are friends or foes.  I have no idea why the table is called &quot;Zebra&quot; in my installation, but I attached the table layout.&lt;/p&gt;
 </description>
     <pubDate>Sat, 01 Mar 2008 21:21:28 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1228903 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I have created a new table</title>
    <link>https://www.webmaster-forums.net/web-database-development/multiple-entries-one-field#comment-1228899</link>
    <description> &lt;p&gt;I have created a new table for recording this (and also friends lists) but was trying to avoid a new row for every memebr one user blocks&lt;/p&gt;
&lt;p&gt;If block 20 people, that&#039;s 20 rows containing my username and the username of the blocked member.&lt;br /&gt;
I was trying to use only one row, so I would have a row with my username, then a field of some kind with all the members in that one field of all the members I blocked.&lt;/p&gt;
&lt;p&gt;since posting this I thought about using a file. Each member will have their own folder on the server anyway as I allow uploads. So I could create a blocked member file and friends file.&lt;br /&gt;
But I truly don&#039;t know the best way, or if my preffered use of one DB row is at all possible.&lt;/p&gt;
&lt;p&gt;I might try to see how PHPBB does it. &lt;/p&gt;
&lt;p&gt;Another query, rather than a new post I will plonk it here.&lt;br /&gt;
When a member posts a new private message, I obviously check the data they typed before storing it in DB. If they did something wrong I store the username they where sending to and their message, so they don&#039;t have to type it again. How do I store the message with a max of 5,000 chars without post data? It must be impractical to use a $_SESSION to store potentially 5,00 chars?&lt;br /&gt;
so what is the best way of that?&lt;/p&gt;
 </description>
     <pubDate>Sat, 01 Mar 2008 19:18:58 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1228899 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>The database relationship</title>
    <link>https://www.webmaster-forums.net/web-database-development/multiple-entries-one-field#comment-1228898</link>
    <description> &lt;p&gt;The database relationship between members and ignored members are many to many.  For example, if I was a member, I could ignore several other members, and at the same time, I could be ignored by several other members.&lt;/p&gt;
&lt;p&gt;This type of database relationship requires another table to be added.  This joining table would have two fields: member_id, and blocked_member_id.  When a member wants to block another member both member ids go into their respective fields.&lt;/p&gt;
&lt;p&gt;When querying the database, if I wanted to find all the members I blocked, I would run:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;SELECT * FROM block_members WHERE member_id = $my_id&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If I wanted a list of all the members that blocked me, I would run:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;SELECT * FROM block_members WHERE blocked_member_id = $my_id&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;(Your field and table names will vary.)&lt;/p&gt;
&lt;p&gt;You can also grab entire profiles with some JOIN statements in the query.&lt;/p&gt;
&lt;p&gt;If you want to post your DB structure, I can give you some more exact queries and examples.&lt;/p&gt;
 </description>
     <pubDate>Sat, 01 Mar 2008 18:36:00 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1228898 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
