Probs with external data

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Hannes
Regular
Posts: 26
Joined: Fri Apr 22, 2005 12:46 pm
Location: Vienna
Contact:

Probs with external data

Post 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
Hannes
Regular
Posts: 26
Joined: Fri Apr 22, 2005 12:46 pm
Location: Vienna
Contact:

Post 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
Post Reply