AW: Re: SQL Datasource Changes [2 Attachments]

"Dr. Frank Hoffmann" <[email protected]>
Newsgroups gmane.comp.cms.zms.devel
Message-ID <F9728233978547D4AF18CDFBB61F907C@hal1>
Hello,
[1]
please delete the xml but the root element "list" (screen zmssqldb0.gif):
<list></list>
[2]
Reconfiguring the model by "configuration" would provide a simple/fast
solution. As you can see with Christian Meier's ZMSLabs there was a change
concerning the letter case. Please check wether the names are identical. In
the next two weeks I will publish some detailed charts about ER modelling
with ZMS.
I remodelled your sql db asuming 'category' is a FK (?); working ER model
and SQL are following.

I hope this woll help.
Regards
fh

ER model (ZMS)
%<-------------------
<list>
  <item type="dictionary">
    <dictionary>
      <item key="columns" type="list">
        <list>
          <item type="dictionary">
            <dictionary>
              <item key="auto"><![CDATA[insert]]></item>
              <item key="hide" type="int">0</item>
              <item key="id"><![CDATA[id]]></item>
              <item key="index" type="int">0</item>
              <item key="label"><![CDATA[Id]]></item>
              <item key="pk" type="int">1</item>
            </dictionary>
          </item>
          <item type="dictionary">
            <dictionary>
              <item key="auto"></item>
              <item key="hide" type="int">0</item>
              <item key="id"><![CDATA[date]]></item>
              <item key="index" type="int">1</item>
              <item key="label"><![CDATA[Date]]></item>
            </dictionary>
          </item>
          <item type="dictionary">
            <dictionary>
              <item key="auto"></item>
              <item key="hide" type="int">0</item>
              <item key="id"><![CDATA[name]]></item>
              <item key="index" type="int">2</item>
              <item key="label"><![CDATA[Name]]></item>
            </dictionary>
          </item>
          <item type="dictionary">
            <dictionary>
              <item key="auto"></item>
              <item key="hide" type="int">0</item>
              <item key="id"><![CDATA[email]]></item>
              <item key="index" type="int">3</item>
              <item key="label"><![CDATA[Email]]></item>
            </dictionary>
          </item>
          <item type="dictionary">
            <dictionary>
              <item key="auto"></item>
              <item key="fk" type="dictionary">
                <dictionary>
                  <item key="displayfield"><![CDATA[active]]></item>
                  <item key="fieldname"><![CDATA[id]]></item>
                  <item key="maxlen"><![CDATA[25]]></item>
                  <item key="tablename"><![CDATA[kategorie]]></item>
                </dictionary>
              </item>
              <item key="hide" type="int">0</item>
              <item key="id"><![CDATA[category]]></item>
              <item key="index" type="int">4</item>
              <item key="label"><![CDATA[Category]]></item>
            </dictionary>
          </item>
          <item type="dictionary">
            <dictionary>
              <item key="auto"></item>
              <item key="hide" type="int">0</item>
              <item key="id"><![CDATA[text]]></item>
              <item key="index" type="int">5</item>
              <item key="label"><![CDATA[Text]]></item>
            </dictionary>
          </item>
        </list>
      </item>
      <item key="filter"></item>
      <item key="id"><![CDATA[anfrage]]></item>
      <item key="interface"></item>
      <item key="label"><![CDATA[Anfrage]]></item>
      <item key="type"><![CDATA[table]]></item>
    </dictionary>
  </item>
  <item type="dictionary">
    <dictionary>
      <item key="columns" type="list">
        <list>
          <item type="dictionary">
            <dictionary>
              <item key="auto"><![CDATA[insert]]></item>
              <item key="hide" type="int">0</item>
              <item key="id"><![CDATA[id]]></item>
              <item key="index" type="int">0</item>
              <item key="label"><![CDATA[Id]]></item>
              <item key="pk" type="int">1</item>
            </dictionary>
          </item>
          <item type="dictionary">
            <dictionary>
              <item key="auto"></item>
              <item key="checkbox" type="int">1</item>
              <item key="hide" type="int">0</item>
              <item key="id"><![CDATA[active]]></item>
              <item key="index" type="int">1</item>
              <item key="label"><![CDATA[Aktiv]]></item>
            </dictionary>
          </item>
        </list>
      </item>
      <item key="filter"></item>
      <item key="id"><![CDATA[kategorie]]></item>
      <item key="interface"></item>
      <item key="label"><![CDATA[Kategorie]]></item>
      <item key="type"><![CDATA[table]]></item>
    </dictionary>
  </item>
</list>
%<-------------------

SQL database
%<-------------------
CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */;
DROP TABLE IF EXISTS `test`.`anfrage`;
CREATE TABLE  `test`.`anfrage` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `date` date default NULL,
  `name` varchar(45) default NULL,
  `email` varchar(45) default NULL,
  `category` int(10) unsigned default NULL,
  `text` text,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `test`.`kategorie`;
CREATE TABLE  `test`.`kategorie` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `active` tinyint(1) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
%<-------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.