Re: Weird php problem

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

 Date:  Thu, 22 Feb 2001 15:51:37 -0500
 To:  <hwg-techniques(at)hwg.org>,
<hwg-servers(at)hwg.org>
 References:  mitre mobile mitre2
  todo: View Thread, Original
You didn't connect...:).

Can you connect to this database from the command line?  It's
possible the username or password is flunking...the table -could-
be corrupted.  I assume the link variable is in scope with the
subsequent function calls?  Sorry...just throwing things out as
they pop into my tiny head...:)

D

----- Original Message -----
From: "Steve Segarra" <ssegarra(at)mitre.org>
To: "The Web Center, Inc." <admin(at)webctr.com>
Cc: <hwg-techniques(at)hwg.org>; <hwg-servers(at)hwg.org>
Sent: Thursday, February 22, 2001 2:55 PM
Subject: Re: Weird php problem


Sorry, should have made this more clearer:  mysql_error() is
returning
"Supplied argument is not a valid MySQL-Link resource"
but, why is it invalid?

steve


"The Web Center, Inc." wrote:
>
> 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