Re: Weird php problem

by "The Web Center, Inc." <admin(at)webctr.com>

 Date:  Thu, 22 Feb 2001 13:31:20 -0500
 To:  <hwg-techniques(at)hwg.org>,
<hwg-servers(at)hwg.org>
 References:  mitre
  todo: View Thread, Original
try printing out mysql_error() after the attempt to connect?

D

----- Original Message -----
From: "Steve Segarra" <ssegarra(at)mitre.org>

Sorry for the cross post, but I'm not sure if its a language error
or
server error.

the following code tells me that I am supplying invalid Link
resources
($dbconn) for every line after the connect statement.  I can
connect to
mysql using a shell running on the web server with the user I am
specyfing no problem.  "errro connecting" never gets printed, but
all
the other errors do.


$dbconn = mysql_connect("localhost", "ics","pw") || print "errro
connecting";
mysql_select_db("inventory", $dbconn) || print "error selecting
db";

$r = mysql_query("select * from locations", $dbconn) || print
"error querying";

$row = mysql_fetch_array($r, $dbconn);

echo $row[0]." ".$row[1];

HWG: hwg-servers mailing list archives, maintained by Webmasters @ IWA