Re: [PHP] Populating HTML List boxes From DB

2001-04-17 Thread Plutarck
] > 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

RE: [PHP] Populating HTML List boxes From DB

2001-04-17 Thread Jason Murray
> > > 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

Re: [PHP] Populating HTML List boxes From DB

2001-04-17 Thread Alexander Skwar
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 (

Re: [PHP] Populating HTML List boxes From DB

2001-04-17 Thread Alexander Skwar
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'; }

RE: [PHP] Populating HTML List boxes From DB

2001-04-16 Thread Peter Houchin
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

RE: [PHP] Populating HTML List boxes From DB

2001-04-16 Thread Jason Murray
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,

Re: [PHP] Populating HTML List boxes From DB

2001-04-16 Thread Brett
> 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

RE: [PHP] Populating HTML List boxes From DB

2001-04-16 Thread Jason Murray
> >$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($

Re: [PHP] Populating HTML List boxes From DB

2001-04-16 Thread Shaun
){ > 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

RE: [PHP] Populating HTML List boxes From DB

2001-04-16 Thread Peter Houchin
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

RE: [PHP] Populating HTML List boxes From DB

2001-04-16 Thread Jason Murray
> 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

RE: [PHP] Populating HTML List boxes From DB

2001-04-16 Thread Peter Houchin
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

RE: [PHP] Populating HTML List boxes From DB

2001-04-16 Thread Peter Houchin
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

Re: [PHP] Populating HTML List boxes From DB

2001-04-16 Thread Alexander Skwar
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

[PHP] Populating HTML List boxes From DB

2001-04-16 Thread Peter Houchin
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] =