View Full Version : Using db functions?
vbelenky
03-05-07, 05:38 AM
Hello,
I'm trying to use db functions such as:
...
<MvEVAL EXPR="{Product_FindFirst_Category(g.Category_Code)}" />
...
and I get the following error:
module.mv:50: CE_167: Function name 'Product_FindFirst_Category' not defined nor recognized as an external function.
Would anybody know what I can do to fix this problem?
Thanks in advance.
RayYates
03-05-07, 10:55 AM
You are attempting to call an internal function within your script Product_FindFirst_Category()
To call the external Merchant db library function use
<MvDO FILE="{ g.Module_Library_DB }" NAME="l.found" VALUE="{ Product_FindFirst_Category(g.Category_Code)) }">
vbelenky
03-06-07, 07:43 AM
Thank you RayYates for your reply. Before I continue with my reaction question let me give background of my task. I want to create a module that will traverse over products for the given category and display them in a certain way.
I found that in the Miva Merchant installation the db.mvc is located in 'httpdocs/mm5/5.00/lib/db.mvc'. I have tried different values for the FILE attribute such as "db.mvc", "mm5/5.00/lib/db.mvc" and so on but the error message displays "...MvDO: Unable to open 'mm5/5.00/lib/db.mvc': No such file or directory". Here is my code segment:
...
<MvDO FILE="mm5/5.00/lib/db.mvc" NAME="l.ctg"
VALUE="{Product_FindFirst_Category(g.Category_Code)}" />
<MvEVAL EXPR="{l.ctg}" />
...
I have read all the developer documentation at http://smallbusiness.miva.com/support/docs/api/ but I did not find anything about this. What is the value that should be used for the FILE attribute of MvDO?
Thanks in advance.
vbelenky
03-07-07, 01:31 AM
Thank you RayYates for replying. As you have suggested I used the command:
<MvDO FILE="mm5/5.00/lib/db.mvc" NAME="l.found" VALUE="{ Product_FindFirst_Category(g.Category_Code)) }">
But I get the following error message:
...MvDO: Unable to open 'mm5/5.00/lib/db.mvc': No such file or directory
I have tried various values for the FILE attribute but I get this file not found error. In the Miva installation the file is located in "httpdocs/mm5/5.00/lib/db.mvc". What is the correct value to use for the FILE attribute? :confused:
Thanks in advance.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.