Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Grabbing tables from other modules
-
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Apr 01, 2005
- Posts: 8
OK...cool.
One more thing...let's say I wanted to run a query on a table that wasn't defined in my module. It would make more sense to add a function to the correct module (SKConfig) and then call that function from the other module (FoodManagement), rather than create the function in FoodManagement and use pnModDBInfoLoad(), right? -
- Rank: Developer
- Registered: Jun 03, 2002
- Last visit: Dec 21, 2009
- Posts: 284
Just a quick note. You may also want to check the "getall" function from SKConfig to see if it has any parameters that are needed. Calling another module's API function will fail if all the required parameters are not specified.
so maybe .... pnModAPIFunc('SKConfig', 'user', 'getall');
may need to be .... pnModAPIFunc('SKConfig', 'user', 'getall', array('param1' => data1, 'param2 => data2, ...));
--
cyber_wolf
www.bkbsolutions.com - My Zikula module development site. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Apr 01, 2005
- Posts: 8
Thanks...it works now...the problem was in my call to pnModAPIFunc()...it didn't work earlier and I am still not sure why.
My only outstanding question is:
let's say I wanted to run a query on a table that wasn't defined in my module. It would make more sense to add a function to the correct module (SKConfig) and then call that function from the other module (FoodManagement), rather than create the function in FoodManagement and use pnModDBInfoLoad(), right?
Does that question make sense? Thanks for all of your help everyone. -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 379
The problem with modding another modle would be that, if that module updates and they add a function called the same thing, but that does something differently, it would mess things up. It's something you wouldn't have any control over. -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 379
Then I guess it just depends on if you want to check the code every time you want to update the other module. If it's your own module, no big deal, but if it's a module someone else is developing, you'd have to check it every time you updated it. Sounds like something that would get to be a real pain, which is why I'd recommend just doing the function in your own module. But if you don't think it'll be a problem, I wouldn't worry about it. :)
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
