I am trying to update four fields of a record. The fields and the data types in the table are as follows:
sold (tinyint 1)
solddate (varchar 10)
soldprice (float 10,2)
soldagency (varchar 25)
Here is the sql I am using:
Here is the section of the form:
The form is not posting errors, but the record doesn't get updated. Nothing happens to the record at all.
Any advice?
LJ Wilson
My personal saying - Just remember, it can always get worse, and usually will.
sold (tinyint 1)
solddate (varchar 10)
soldprice (float 10,2)
soldagency (varchar 25)
Here is the sql I am using:
Code:
// Create a mysql query
$sql = 'UPDATE '. PROPERTIES_TABLE .
' SET sold = 1, solddate = "' . $form['solddate'] . '",
soldprice = "' . $form['soldprice'] . '",
soldagency = "' . $form['soldagency'] . '"
WHERE id = "' . intval($_GET['id']) . '"';
$db->query($sql) or error ('Critical Error', mysql_error ());
Here is the section of the form:
Code:
echo userform ('Sold Date (YYYY-MM-DD)', '<input type="text" size="45" name="solddate" value="' . $form['solddate'] . '" maxlength="255">');
echo userform ('Sold Price', '<input type="text" size="45" name="soldprice" value="' . $form['soldprice'] . '" maxlength="255">');
echo userform ('Sold Agency', '<input type="text" size="45" name="soldagency" value="' . $form['soldagency'] . '" maxlength="255">');
The form is not posting errors, but the record doesn't get updated. Nothing happens to the record at all.
Any advice?
LJ Wilson
My personal saying - Just remember, it can always get worse, and usually will.