Wrong parameter count
| From: | Peter Houchin | Date: | Tue, 17 Apr 2001 03:40:06 +0000 |
| Subject: | Wrong parameter count | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-48882@lists.php.net to get a copy of this message | ||
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
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
while($row = mysql_fetch_array($result)){
echo '<option
value="'.$row[device].'">'.$row[device].'</option><br>';
}
?>
</select>
<input type="submit" name="select" value="select">
</form> <!-- end Select form-->
<?
echo mysql_error();?>
<? if($select){
?>
<!-- Update form start -->
<?
$foo = "SELECT * FROM 3backup WHERE device='$device' ORDER BY device";
$result = mysql_query($foo,$db);
//$result = mysql_db_query('test',$foo);
echo "$foo";
echo mysql_error();
}
?>
Peter Houchin
peterh@sunrentals.com.au
=========================================================
_____ __ /\
/_/_/_\ / |_/ \
/_/_/_ __ __ __ __ / \
\_/_/_\ /_/ /_/ /_/ /_/ \ _ /
___\_\_\/ /_/_/_/ /_//\/_/ \_/ \/\_/
\_//_/_/ /_/_/_/ /_/ \/_/ v
________ ________________________________________
/_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
/_/_ _/_/ ______ __ __ /_/ ____ __ ______
/_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\ /_/ /_/_/_/
/_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\
/_/ \_\/_/_/_/ /_/ \/_/ /_/ /_/ \_\/_/_/_//_/_/_/
=========================================================
Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755
************* We rent the dot in .COM! **************