close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Wrong db entry created

Thread began 5/29/2011 5:55 pm by Daryl | Last modified 5/29/2011 6:15 pm by Daryl | 791 views | 1 replies |

DarylBeta Tester

Wrong db entry created

I have a file upload that resizes the image twice, one for the main photo and one for the thumbnail.

Both files are resized and uploaded correctly, however the file name for the thumbnail is repreated in both fields in the database.

I have tried the known issue fix by updating the helper.php file but this hasn't helped.

Any ideas?

// WA_UploadResult2 Params Start
$WA_UploadResult2_Params = array();
// WA_UploadResult2_2 Start
$WA_UploadResult2_Params["WA_UploadResult2_2"] = array(
'UploadFolder' => "../images/Album/Thumbnail/",
'FileName' => "[FileName]_thumb",
'DefaultFileName' => "",
'ResizeType' => "1",
'ResizeWidth' => "200",
'ResizeHeight' => "200",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult2_2 End
// WA_UploadResult2_1 Start
$WA_UploadResult2_Params["WA_UploadResult2_1"] = array(
'UploadFolder' => "../images/Album/Photos/",
'FileName' => "[FileName]_photo",
'DefaultFileName' => "",
'ResizeType' => "1",
'ResizeWidth' => "600",
'ResizeHeight' => "600",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult2_1 End
// WA_UploadResult2 Params End
// WA Application Builder Insert
if (isset($_POST["Insert_x"])) // Trigger
$WA_connection $k9sar;
$WA_table "albums";
$WA_sessionName "WADA_Insert_albums";
$WA_redirectURL "albums_Detail.php";
  if (
function_exists("rel2abs")) $WA_redirectURL $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
$WA_keepQueryString false;
$WA_indexField "id";
$WA_fieldNamesStr "album_name|album_img|album_thumb|album_caption";
$WA_fieldValuesStr "".((isset($_POST["album_name"]))?$_POST["album_name"]:"")  ."" "|" "".$WA_DFP_UploadStatus["WA_UploadResult2"]["serverFileName"]  ."" "|" "".$WA_DFP_UploadStatus["WA_UploadResult2"]["serverFileName"]  ."" "|" "".((isset($_POST["album_caption"]))?$_POST["album_caption"]:"")  ."";
$WA_columnTypesStr "',none,''|',none,''|',none,''|',none,''";
$WA_fieldNames explode("|"$WA_fieldNamesStr);
$WA_fieldValues explode("|"$WA_fieldValuesStr);
$WA_columns explode("|"$WA_columnTypesStr);
$WA_connectionDB $database_k9sar;
  if (!
session_id()) session_start();
$insertParamsObj WA_AB_generateInsertParams($WA_fieldNames$WA_columns$WA_fieldValues, -1);
$WA_Sql "INSERT INTO `" $WA_table "` (" $insertParamsObj->WA_tableValues ") VALUES (" $insertParamsObj->WA_dbValues ")";
$MM_editCmd mysql_query($WA_Sql$WA_connection) or die(mysql_error());
$_SESSION[$WA_sessionName] = mysql_insert_id();
  if (
$WA_redirectURL != "")  {
    if (
$WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL'?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
header("Location: ".$WA_redirectURL);
Sign in to reply to this post

DarylBeta Tester

I hadnt noticed the additional Session Variables below the SERVER FILE NAME that I should have been using for multiple file uploads


Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...