The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

adodb Database Description to XML Schema

Just wondering if anyone has any experience of adodb, in particular how good it is as describing databases, such as the data type of a column.

Using the MySQL functions, you have mysql_fetch_field() which returns an object describing the column.

The reason why? Well been toying with XML Schemas and was wondering idily; "How hard would it be to examine a table or database and create an XML schema from it?"

Once you have a schema from a database, you have something to generate things like HTML forms on the fly, with the help of a little XSL. You also have a basis for building a navigation system for your data, generating XML from the queries, slapping XSL over the top.

All it would take is a cunning mechanism for defining XSL Templates (any ideas?) and PHP will rule the world! mwhuhahaahahahaha!

for example, when you get the type of a column, it gives you a number, that is part of the adTypeEnum. there is a number for every possible datatype. you can find the constants in adodb.inc, that comes with ASP ( I have no idea where to find that now )