maybe my sql syntax is completely wrong, but the "$id" part was a random
number i generated, and then I was saying WHERE songid(which is the database
field) is equal to $id. is that the wrong way?

the reason why it's songid in that second <a> tag is because I wanted the
random number to indentify the song pulled from the database..so the
database uses that number in the part where it
says..."stream.php?songid=<?php echo $id;?>

tell me if I need to clarify!
chris

----- Original Message -----
From: Christopher Ostmo <[EMAIL PROTECTED]>
To: Chris Cocuzzo <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 10:38 PM
Subject: Re: [PHP]MySQL error, what's wrong here..


> Chris Cocuzzo pressed the little lettered thingies in this order...
>
> > alright, new problem, no more errors, but there's just nothing...here's
the
> > code:
> >
> >   $query = "SELECT name FROM mp3 WHERE songid = '" .$id."'";
> >
> > <a href="http://www.fplg.net/stream.php?songid=2"; class="hov1"></a>
> >
>
> Uhh... maybe I'm missing something here, but the URL supplies
> $songid and the query is getting $id.  Unless your getting $id from
> somewhere other than the URL, you're going to be getting only results
> with an empty songid field.  Another thing to try is to "or die" your
query
> to check to see if the SQL syntax is OK:
> $result=mysql_query($query,$connection) or die(mysql_error());
>
> Good luck...
>
> Christopher Ostmo
> a.k.a. [EMAIL PROTECTED]
> AppIdeas.com
> Innovative Application Ideas
> Meeting cutting edge dynamic
> web site needs since the
> dawn of Internet time (1995)
>
> Business Applications:
> http://www.AppIdeas.com/
>
> Open Source Applications:
> http://open.AppIdeas.com/
>
> --
> 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]

Reply via email to