Re: mysql
| From: | hugh danaher | Date: | Thu, 31 Jan 2002 07:58:41 +0000 |
| Subject: | Re: mysql | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-82885@lists.php.net to get a copy of this message | ||
I don't know what the manual says, but if I were you I'd check this:
mysql_select_db($db,$link) or die ("Can't log in at this time");
----- Original Message -----
From: "Jason Wong" <php-general@gremlins.com.hk>
To: <php-general@lists.php.net>
Sent: Wednesday, January 30, 2002 9:51 PM
Subject: Re: [PHP] mysql
> On Thursday 31 January 2002 13:48, Mason Batley wrote:
> > G'day
> >
> > I keep getting an error message of :Warning: Supplied argument is not a
> > valid MySQL result resource in
/var/www/html/RageProject/StripPlayList.php
> > on line 100 Rows:
> >
> >
> > $link = mysql_connect("127.0.0.1", "rage", "rage");
> > mysql_select_db("rage");
> > $query = "Select id from songs
> > where songname = '$Song' and
> > artist = '$Artist'";
> > $result = mysql_query($query);
> > $rows = mysql_num_rows($result); <<< Line 100
> > echo "Rows: $rows";
> > mysql_close($link);
> >
> > Can someone explain why.. I've been trying to work it out for 2 long.
>
> echo $query;
>
>
> to see whether the query looks ok.
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
>
> /*
> * UNIX is a Trademark of Bell Laboratories.
> */
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>