Hi Peter,
@ 11:40:06 PM on 4/16/2001, Peter Houchin wrote:
> Hi, can some one please help me figure out why the value $device
> isn't being passed on out of the select box? i keep getting this
> message when i view the source
(OK, lets try this again)
> Wrong parameter count for mysql_result() in D:\erentals/1.php on line 19
> <form name="select" method="post" action="1.php">
> <select name="device"><?
> $query ="SELECT DISTINCT device FROM 3backup";
> $result = mysql_query($query);
> $device = mysql_result($rs); // line 19
Two parameters are required, the third is optional.
mixed mysql_result (int result, int row [, mixed field])
So you're just getting one row with mysql_result(). You probably want
mysql_fetch_array() or mysql_fetch_object() if you want more than one
row.
If you don't, you'll need to use mysql_result($rs,$i) where $i is a
row number.
-Brian
--
PGP is spoken here: 0xE4D0C7C8
Please, DO NOT carbon copy me on list replies.
--
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]