Technote Details :: When using MX Includes, I get an error message
Issue
After building several dynamic pages that retrieve data through recordsets, I have included them into a single main page, using MX Includes. Now the page displays a warning:
Warning: mysql_free_result(): 34 is not a valid MySQL result resource in C:\Inetpub\wwwroot\<site_name>\index.php on line 44
Reason
This happens because the page that includes the others contains a recordset named as one from the included pages. When adding a Dreamweaver recordset, a call to the mysql_free_result() function is placed at the page end, for each page. Thus, when including the page with the same recordset name, its identifier will be removed by the call in the included file, and the warning is displayed.
Solution
When using MX Includes server behaviors to include multiple pages you must make sure that the main page recordset names are unique. This applies for both static includes, and dynamically included files.