In your code, you have the lines:
--
while($mp3d = mysql_fetch_array($result))
{
$mp3d = mysql_fetch_array($result);
?>
--
In the while control structure, you are fetching a result into $mp3d, then
inside the brackets, you fetch a second (non-existing) result into $mp3d
again. Try it without the third line of that segment.
james
-Original Message-
From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 23, 2001 7:39 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP]MySQL error, what's wrong here..
alright, new problem, no more errors, but there's just nothing...here's the
code:
and here's what the HTML code looks like from the page when i test it out..
http://www.fplg.net/stream.php?songid=2"; class="hov1">
what's going on with that...
chris
----- Original Message -
From: James Bogosian <[EMAIL PROTECTED]>
To: Chris Cocuzzo <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 7:25 PM
Subject: RE: [PHP]MySQL error, what's wrong here..
> Try:
>
> $query = "SELECT songname FROM mp3 WHERE sgid = '" .$id."'";
>
> an SQL query requires you to quote strings.
>
> james
>
> -Original Message-
> From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 23, 2001 6:57 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP]MySQL error, what's wrong here..
>
>
>$id = rand(1,2);
> $query = "SELECT songname FROM mp3 WHERE sgid = " .$id;
> $result = mysql_query($query,$connection);
> $mp3d = mysql_fetch_array($result);
> ?>
>
> the server is telling me line 43(which starts with $mp3d) is not a valid
> mysql result resource. what am i doing wrong??
>
> chris
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]