And see why it isn't adding the right option in the database.
What the problem is, on the auction type, if I select dutch, is still records in the database as 1 which is standard.
Here is the form for adding an auction. what it is called is auction_type . It looks ok from what I can see. Maybe some fresh eyes can see something else.
function insert_auction ($db) {
$auction_starts = time();
//set this to minutes by using the first line
$auction_ends = $this->DateAdd("d",$auction_starts,$this->auction_variables["auction_length"]);
//echo gettype($auction_ends)." is the type of ends time<br>\n";
//echo $auction_ends." is auction ends<br>\n";
//echo $auction_starts." is auction starts<br>\n";
if ($this->auction_variables["opening_bid"] == "")
$opening_bid = .01;
else
$opening_bid = $this->auction_variables["opening_bid"];
if ($this->auction_variables["reserve_price"] == "")
$reserve_price = .01;
else
$reserve_price = $this->auction_variables["reserve_price"];
$sql_query = "INSERT INTO ".$this->auctions_table."
(seller,title,date,description,category,minimum_bid,reserve_price,auction_type,
duration,location_state,location_zip,ends,closed,quantity)
VALUES
(\"".$this->seller_id."\",
\"".$this->auction_variables["auction_title"]."\",
\"".$auction_starts."\",
\"".$this->auction_variables["description"]."\",
".$this->terminal_category.",
".$opening_bid.",
".$reserve_price.",1,
".$this->auction_variables["auction_length"].",
\"".$this->auction_variables["state"]."\",
\"".$this->auction_variables["zip_code"]."\",
\"".$auction_ends."\",
0,
".$this->auction_variables["number_of_items"]." )";
$result = &$db->Execute($sql_query);
if (!$result)
{
//echo $sql_query." is the query<br>\n";
return false;
}
else
{
$this->auction_id = $db->Insert_ID();
//echo $this->auction_id." is the auction id<bR>\n";
if ($this->temp_auction_image)
{
//move the auction temp image into the images directory
if (is_file($this->temp_upload_path.$this->temp_auction_image))
{
//echo $this->temp_upload_path.$this->temp_auction_image." is the temp auction image path<br>\n";
//echo $this->auction_images_path.$this->auction_id.$this->temp_auction_image_type." is the final destination path<br>\n";
//echo "the uploaded file is there<br>\n";
//echo $this->temp_upload_path.$this->temp_auction_image." is the temp auction image path<br>\n";
//echo $this->auction_images_path.$this->auction_id.$this->temp_auction_image_type." is the final destination path<br>\n";
if (copy($this->temp_upload_path.$this->temp_auction_image,$this->auction_images_path.$this->auction_id.$this->temp_auction_image_type))
{
//echo $this->temp_upload_path.$this->temp_auction_image." is the temp auction image path<br>\n";
//echo $this->auction_images_path.$this->auction_id.$this->temp_auction_image_type." is the final destination path<br>\n";
//echo "copy worked<Br>\n";
chmod($this->auction_images_path.$this->auction_id.$this->temp_auction_image_type, 0755);
$sql_query = "update ".$this->auctions_table." set image_url = \"".$this->url_to_images_directory.$this->auction_id.$this->temp_auction_image_type."\"
where id = ".$this->auction_id;
$result = &$db->Execute($sql_query);
if (!$result)
{
//echo $sql_query." is the query<br>\n";
$this->error_message = $this->messages[2052];
return false;
}
}
else
{
//echo "copy did not work<br>\n";
}
}
}
else
{
$sql_query = "update ".$this->auctions_table." set image_url = \"".$this->auction_variables["image_url"]."\"
where id = ".$this->auction_id;
$result = &$db->Execute($sql_query);
if (!$result)
{
echo $sql_query." is the query<br>\n";
$this->error_message = $this->messages[2052];
return false;
}
}
return true;
}
} //end of function insert_auction
this isn't my code, but If I cannot figure out why it isn't putting the data in correctly I suppose I can just redo all of it.