- Original Message -
From: "James Holloway" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 24, 2001 11:05 AM
Subject: Re: [PHP]MySQL error, what's wrong here..
> Hi Chris,
>
> If you're using MySQL 3.23+, you might want to consider usi
Hi Chris,
If you're using MySQL 3.23+, you might want to consider using something
like:
SELECT songname FROM mp3 ORDER BY RAND() LIMIT 1
Not that this answers your original problem, but it seems to make more sense
than manually coding a random number (which is, perhaps, impractical
especiallyif
my guess would be that sgid is a character field. if this isn't the case
then try hardcoding a known id into the query and seeing what happens. It
could also be that the connection has failed, try something like:
if ($connection = mysql_connect())
{
...
$id = rand(1,2);
$query = "
On Tue, 24 Jul 2001 14:10, Chris Cocuzzo wrote:
>
> - 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
<[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
th
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."'";
>
> http://www.fplg.net/stream.php?songid=2"; class="hov1">
>
Uhh... maybe
;>
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:
>
>
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 songnam
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
9 matches
Mail list logo