Page 1 of 1

Probs with external data

Posted: Sun Oct 02, 2005 9:22 pm
by Hannes
Hi s9y community!

I want to add some php code with the external php plugin. This works well. The problem is that the sidebar cannot be displayed. The following errors occur:

Code: Select all

Warning: mysql_query(): 20 is not a valid MySQL-Link resource in /home/www/web312/html/new/include/db/mysql.inc.php on line 37

Warning: mysql_error(): 20 is not a valid MySQL-Link resource in /home/www/web312/html/new/include/db/mysql.inc.php on line 40

Warning: mysql_error(): 20 is not a valid MySQL-Link resource in /home/www/web312/html/new/include/db/mysql.inc.php on line 46

SELECT * from ser_plugins  WHERE  placement =  'right'  ORDER BY placement, sort_order

/
What I have found out, that the problems have something to do with the database access. To include php code without database connection makes no problems.
You can see the problem in action here: http://www.hannesreiff.com/new/index.ph ... books.html
Thank you for your help!

Hannes

PS: I'm using s9y 0.9 alpha5 and the latest versions of the external and static page plugins

Posted: Mon Oct 03, 2005 4:06 pm
by Hannes
OK, here comes the answer. I found a hint in this post http://www.s9y.org/forums/viewtopic.php ... ternal+php

1. Renaming the php variables, e.g. $res into $GLOBALS['res']
2. Not to close the database connection, when making a connection to the same db.

Hannes