RE: [PHP] baffled :<:<

From: Date: Tue, 17 Apr 2001 06:18:13 +0000
Subject: RE: [PHP] baffled :<:<
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-48901@lists.php.net to get a copy of this message
yes i know it was mearly there to show i had it in my script as i said in my initial post i could get info from the db, just not in the while loop -----Original Message----- From: Rasmus Lerdorf [mailto:rasmus@php.net] Sent: Tuesday, April 17, 2001 4:08 PM To: Peter Houchin Cc: Php-General@Lists. Php. Net Subject: Re: [PHP] baffled :<:< > $db = include"connect.inc"; includes do not return anything useful, so this is a bogus statement. > $foo = "SELECT * FROM 6pci WHERE card='$card' ORDER BY card"; > > $result = mysql_query($foo,$db); An include certainly cannot return a database handle. Included files operate in the same variable scope as the script doing the inclusion. So simply set $db in your connect.inc file and it will automatically be available to you after the include. -Rasmus

« previous php.general (#48901) next »