Connecting to MySQL database

From: Date: Mon, 08 Oct 2001 12:52:45 +0000
Subject: Connecting to MySQL database
Groups: php.general 
Request: Send a blank email to php-general+get-70350@lists.php.net to get a copy of this message
Hi, small problem : I have a couple of functions, which, in pseudo-code, do this : function func_a() connect to database run query for (each line of query) echo( func_b(some_data) ) close connection function func_b(some_data) connect to database run query(some_data) if (condition) return ("good") else return ("bad") close connection The connect code is identical in both functions (even the variable names are the same), but the resources aren't declared global anywhere. My problem is that when I attempt to close the connection in func_a(), I get this error : Warning: 3 is not a valid MySQL-Link resource in C:\Program Files\Internet\Apache\Apache\htdocs/show_board.php on line 78 Is something stopping me having two connections open at the same time? djo

« previous php.general (#70350) next »