Elxis CMS Forum
Support => Database => Topic started by: sdancer75 on January 08, 2009, 16:00:23
-
Hi,
Is that possible with Elxis CMS to edit custom desgined database fields directly ?
For example if I have a DB Field of varchar(1000) type and select edit, to display a Rich Document Field Editor, or use sql query to display a drop down menu.
I need something like the UTE (Universal Table Editor) in ASP you can see at http://www.codeproject.com/KB/asp/ute.aspx (http://www.codeproject.com/KB/asp/ute.aspx)
Can you direct me to a similar product that can be used with open source code like elxis, Joomla etc ?
Regards,
-
Elxis has a built in database manager but for security reasons does not allow you to edit the database. With a little effort you can create an Elxis component which will allow you to edit database. Elxis' ADOdb will halp you a lot in this.
Here is a sample on how you can rename a column:
$datadict = NewDataDictionary($database->_resource, $database->_resource->databaseType);
$query = $datadict->RenameColumnSQL($database->_table_prefix.'table name','old column name','new column name');
$database->_resource->Execute($query);
Here is the ADOdb's datadict manual:
http://phplens.com/lens/adodb/docs-datadict.htm (http://phplens.com/lens/adodb/docs-datadict.htm)