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 'option value="'; echo $device; echo '"'; echo $device; echo '/option\n'; } should be while($row = mysql_fetch_object($rs)){ echo 'option

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 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 List

Re: [PHP] Populating HTML List boxes From DB

2001-04-17 Thread Plutarck
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 could point me in the right directi

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'll

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 Peter Houchin
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 could point me

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

RE: [PHP] Populating HTML List boxes From DB

2001-04-16 Thread Peter Houchin
-- 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 different values... how can

RE: [PHP] Populating HTML List boxes From DB

2001-04-16 Thread Jason Murray
select name="device" ?php $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.

Re: [PHP] Populating HTML List boxes From DB

2001-04-16 Thread Brett
? /select 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 say in my db i have multiple va

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 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 boxes From DB select