xml creating problem

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
irfan_sw
Forum Newbie
Posts: 8
Joined: Tue Aug 31, 2010 4:59 am

xml creating problem

Post by irfan_sw »

hello.
I am creating a table using xml. my whole code is fine. i want to add an auto increament attribute to my id field. I don't understand how to add this property in my table.
My code listed below.
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="blocks/test/db" VERSION="2004111200" COMMENT="XMLDB file for Moodle todo block tables"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
<TABLES>
<TABLE NAME="test" COMMENT="to store test data">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="name"/>
<FIELD NAME="name" TYPE="char" LENGTH="40" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="id"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" />

</KEYS>

</TABLE>

</TABLES>
</XMLDB>

can anyone plz help me out....
Post Reply