Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Instant Website: Realty/Listings/Auto:
Easy way to update section from MySQL table

 

 


danw
User

Sep 30, 2009, 7:16 PM

Post #1 of 4 (5970 views)
Shortcut
Easy way to update section from MySQL table Can't Post

I'm looking for an easy way to update a section from another MySQL table. The table has records created from an external form and I would like those to be copied/imported to a section(table). I can create the section ok but I'm unsure about some of the systems fields like dragsortorder and createddate.


Chris
Staff


Sep 30, 2009, 9:43 PM

Post #2 of 4 (5964 views)
Shortcut
Re: [danw] Easy way to update section from MySQL table [In reply to] Can't Post

Hi danw,

I can think of two approaches here:

1) Build a custom import script to move your data from your custom table to your CMSB-controlled table. If you want to keep the dragSortOrder, createdDate, and updatedDate fields, your import script will need to set them, otherwise you can turn on System Field Editing and simply remove them.

2) Your external form could simply add records directly to a CMSB-controlled table. If you want to keep the dragSortOrder, createdDate, and updatedDate fields, your external form will need to set them, otherwise you can turn on System Field Editing and simply remove them.

I hope this helps. Please let me know if you have any questions.
Chris


danw
User

Sep 30, 2009, 11:16 PM

Post #3 of 4 (5950 views)
Shortcut
Re: [chris] Easy way to update section from MySQL table [In reply to] Can't Post

Chris, thanks for the help. I already tried something like this, ran into snags with datatypes and putting carts before horses. I finally achieved it though, inch by inch. It involved copying the ini.php file so that I could get the table I created onto the editor list.

Thanks again.


Chris
Staff


Oct 1, 2009, 10:09 AM

Post #4 of 4 (5910 views)
Shortcut
Re: [danw] Easy way to update section from MySQL table [In reply to] Can't Post

Hi danw,

Good to hear you've got this figured out.

I think you may have also been able to accomplish this by creating the table with CMSB, then ALTERing the table in MySQL to fit your needs.
Chris