<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1024996" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1024996</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/appointment-script#comment-1152392</link>
    <description> &lt;p&gt;Much thanks for your help!!!&lt;/p&gt;
&lt;p&gt;I came up with a solution. Based upon  $time and $machine being the unique fields of the table, I was having the php display the default error text for a 1062 error (which is duplicate entry for key whatever). This text is stored in the mysql share folder and could be changed very easily on my test server, but not on a customers server. Instead of passing a null argument, I passed a variable called $error, which was defined to have the desired error text.&lt;/p&gt;
&lt;p&gt;See? Ya learn something new every day. =)&lt;/p&gt;
 </description>
     <pubDate>Mon, 31 May 2004 02:18:51 +0000</pubDate>
 <dc:creator>mjs416</dc:creator>
 <guid isPermaLink="false">comment 1152392 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/appointment-script#comment-1152357</link>
    <description> &lt;p&gt;My logic is that a) I don&#039;t know the script and b) each cell in an appointment book would be unique. So you&#039;re db solution is great (and is the identifier...)&lt;/p&gt;
&lt;p&gt;date1[time1/slot1, time1/slot2, time1/slot3, time1/slot4]&lt;br /&gt;
date1[time2/slot1, time2/slot2, time2/slot3, time2/slot4]&lt;/p&gt;
&lt;p&gt;et cetera.&lt;/p&gt;
&lt;p&gt;I don&#039;t know how this information is recorded, nor how it&#039;s determined. Without knowing that, I gave you what I could guess at.&lt;/p&gt;
 </description>
     <pubDate>Sun, 30 May 2004 16:26:43 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1152357 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/appointment-script#comment-1152353</link>
    <description> &lt;p&gt;Well, I have figured out a way to do it with mysql. All that is needed is to simply make the time and machine fields in the db - Unique. This in turns returns a duplicate entry error if you try and schedule an appointment at time X and machine Y; if someone have already reserved the machine Y for time X. Another question has now arisen; is it possible to change the (or modify the) error text returned by mysql with the dyplicat error message ? Currently, the error returned appears as &quot;Duplicate Entry for &#039;time-machine&#039; key 2. Can I change that to - &quot;There was an error reserving that machine at that time - please click the back button and try a different time slot.&quot;&lt;/p&gt;
&lt;p&gt;Also, I dont follow your logic suzanne. This &quot;identifier&quot; will need to be compared against every entry in the db, not just a single value.&lt;/p&gt;
 </description>
     <pubDate>Sun, 30 May 2004 13:50:25 +0000</pubDate>
 <dc:creator>mjs416</dc:creator>
 <guid isPermaLink="false">comment 1152353 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/appointment-script#comment-1152341</link>
    <description> &lt;p&gt;I don&#039;t know how it&#039;s determined? It can&#039;t be just $time and $machine, there must be some other identifier.&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;if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$identifier &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;== &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;set flag value&#039;&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;$error &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;this is the error message&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;} else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$error &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;and where the error message would go:&lt;/p&gt;
&lt;p&gt;&amp;lt;?=$error;?&amp;gt;&lt;/p&gt;
 </description>
     <pubDate>Sun, 30 May 2004 03:26:28 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1152341 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/appointment-script#comment-1152340</link>
    <description> &lt;p&gt;It is quite possible that there is way, are you able to show us the code?&lt;/p&gt;
 </description>
     <pubDate>Sun, 30 May 2004 03:24:39 +0000</pubDate>
 <dc:creator>Renegade</dc:creator>
 <guid isPermaLink="false">comment 1152340 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
