]
> Sent: Tuesday, April 17, 2001 10:17 AM
> To: Peter Houchin
> Cc: Php-General@Lists. Php. Net
> Subject: Re: [PHP] Populating HTML List boxes From DB
>
>
> So sprach Peter Houchin am Tue, Apr 17, 2001 at 10:08:36AM +1000:
> > 1: is there a way to populate a list box
> > > while($row = mysql_fetch_row($rs))
> >
> > ^^^ should be "array".
>
> Why should it be array and not, let's say, object?
Because I went on to use it as if I'd used fetch_array in the rest
of the example code, I'd wager.
:)
Jason
--
PHP General Mailing L
So sprach Jason Murray am Tue, Apr 17, 2001 at 11:55:44AM +1000:
> Brief correction.
>
> > while($row = mysql_fetch_row($rs))
>
> ^^^ should be "array".
Why should it be array and not, let's say, object?
Alexander Skwar
--
How to quote: http://learn.to/quote (
So sprach Shaun am Mon, Apr 16, 2001 at 06:53:40PM -0500:
> this
> while($row = mysql_fetch_object($rs)){
> echo '';
> echo $device;
> echo '\n';
>}
>
> should be
while($row = mysql_fetch_object($rs)){
echo '';
echo $row->device;
echo '\n';
}
Thanks Every one it now works like a charm (o:
-Original Message-
From: Jason Murray [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 11:55 AM
To: 'Peter Houchin'; Jason Murray; Php-General@Lists. Php. Net
Subject: RE: [PHP] Populating HTML List box
Brief correction.
> while($row = mysql_fetch_row($rs))
^^^ should be "array".
Jason
--
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,
> Any suggestions?
>
> Peter
> -Original Message-
> From: Jason Murray [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 17, 2001 11:12 AM
> To: 'Peter Houchin'; Php-General@Lists. Php. Net
> Subject: RE: [PHP] Populating HTML List boxes From DB
>
&g
>
>$query ="SELECT DISTINCT device FROM 3backup ORDER BY device";
> $rs =mysql_query($query);
$rs is now the result set for your SQL.
> $device = mysql_result($rs, 'device');
This is wrong. Check the manual page for how you use mysql_result.
http://www.php.net/mysql-result
> while($
){
> echo '';
> echo $device;
> echo '\n';
> }
> ?>
>
>
> Any suggestions?
>
> Peter
> -Original Message-
> From: Jason Murray [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 17, 2001 11:12 AM
> T
inal Message-
From: Jason Murray [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 11:12 AM
To: 'Peter Houchin'; Php-General@Lists. Php. Net
Subject: RE: [PHP] Populating HTML List boxes From DB
> say in my db i have multiple values that are the same as well
> as
> say in my db i have multiple values that are the same as well
> as different values... how can i restrict it to showing each
> value just once?
Sounds like you want a "SELECT DISTINCT".
You might want to have a look at www.sqlcourse.com.
Jason
--
PHP General Mailing List (http://www.php.n
April 17, 2001 10:17 AM
To: Peter Houchin
Cc: Php-General@Lists. Php. Net
Subject: Re: [PHP] Populating HTML List boxes From DB
So sprach Peter Houchin am Tue, Apr 17, 2001 at 10:08:36AM +1000:
> 1: is there a way to populate a list box from a db?
Sure.
>
> 2: if some one
lol, Thanks for your help Alexander :)
-Original Message-
From: Alexander Skwar [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 10:17 AM
To: Peter Houchin
Cc: Php-General@Lists. Php. Net
Subject: Re: [PHP] Populating HTML List boxes From DB
So sprach Peter Houchin
So sprach Peter Houchin am Tue, Apr 17, 2001 at 10:08:36AM +1000:
> 1: is there a way to populate a list box from a db?
Sure.
>
> 2: if some one could point me in the right direction, with out actually giving a
>example, as to how to go about it as i've
>got no idea
Uhm, no example? I'l
Hiya,
I was wondering
1: is there a way to populate a list box from a db?
2: if some one could point me in the right direction, with out actually giving a
example, as to how to go about it as i've
got no idea
Thanks
Peter Houchin
[EMAIL PROTECTED]
=
15 matches
Mail list logo