value field filled by mysql output

From: Date: Wed, 22 Oct 2003 13:12:04 +0000
Subject: value field filled by mysql output
Groups: php.general 
Request: Send a blank email to php-general+get-167085@lists.php.net to get a copy of this message
I am creating a form for editing records output from a mysql db (edit as an html form). I've done this many times, but have never run into this issue. I have code like this for the query: $edit_list = mysql_query("SELECT general_inventory.quantity FROM products_to_categories, general_inventory WHERE products_to_categories.categories_id = $cat AND products_to_categories.products_id = general_inventory.product_id ORDER BY general_inventory.name"); And like this for getting the output, inside a while loop: $edit_details = mysql_fetch_array ($edit_list); $qty = $edit_details['quantity']; <td align='center'><input type=text name='qty$ed' value='$qty' size='3'></td> Now, I get more than one column in a row, but I abbreviated it for here and for testing. Every column comes out and fills in the form properly except this one. The issue I am having is that the value of the input text box is being listed as '1', even if the database shows either a value of nothing (meaning, blank) or a value of zero. Anyone have any idea why this might be? Thanks, -Mike

« previous php.general (#167085) next »