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:[EMAIL PROTECTED]]
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