-
- 59 Posts
Hey Everyone,
I created my own mysql database that needs to be integrated into modx. It works fine outside of modx, just can’t figure out how to integrate it.
Will Pay, negotiable.
Thanks,
Josh
-
- 150 Posts
Do you have a bit more information? What’s in the database, how you want it integrated etc?
-
- 1,611 Posts
You might take a look at how MaxiGallery is set up. It uses its own table within the MODx database and runs queries on it to add/edit/delete information. You’ll find examples of all of the code you need to access your database in there, assuming you combine it with the MODx database (separate tables, same database).
Doing it this way has some advantages, including that it’s very easy and you can backup your custom database using the Manager’s backup feature. But if you like you can also keep it completely separate and just connect to it when necessary. I don’t recommend you do this unless there’s a compelling reason, however, since it complicates the task slightly.
I bet that if you give us a little more info we can help you to do this on your own (which would be more satisfying, and cheaper, too).
-
- 4,213 Posts
And Susan has a tutorial on her site how to do a database managing module (www.sottwell.com)
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
-
- 4,213 Posts
The building blocks for what you want to do are right there. Did you notice that Susan’s tutorials also have files that you can download to see how the accessing to the DB is done.. and if you want the info to be shown in front page, you need to use dbapi for example to query the data and build the desired output out of it within a snippet. There is no magical snippet around that will query your external database tables and show it in a format that you like straight away. MakeTable and some of the TV widgets can build a table views though, but I bet that’s not what you want.. So it’s just a matter of putting your php cap on and start coding!
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
-
- 4,213 Posts
Oh, I thought that you knew some php.. well in that case, I hope you will get someone to help, unless you are willing to do some studying yourself, plenty of php books out there
"He can have a lollipop any time he wants to. That's what it means to be a programmer."