Hi, I’m having a problem with a snippet. I wrote up some code to extract some posts from my forum to display them on my homepage. It worked without MODx, but I put that same code as a snippet and now I’m getting parsing errors.
I believe it’s because I’m selecting a different DB than what modx was installed to, and I was wondering what I should to to do about resolving this issue. Thanks alot!
Can you please provide details of error ?
thanks.
zi
Sure.
PHP error debug
Error: mysql_result(): supplied argument is not a valid MySQL result resource
Error type/ Nr.: Warning - 2
File: /www/z/zeroinfinity2/htdocs/manager/includes/document.parser.class.inc.php(667) : eval()’d code
Line: 131
Like I said though.. the script connects to a different database.. Maybe that’s it?
-
☆ A M B ☆
- 24,524 Posts
There are some functions in the parser class for accessing an external database. You’ll need to scan through the parser class file to find them, though. They aren’t part of the MODx DBAPI.
-
☆ A M B ☆
- 24,524 Posts
Thanks, Jason. That is much better! This fairly obvious advantage of a class structure went right past me.
hi Zacarias !
We are glad to know that your problem is solved.
regards,
zi