perhaps you can help me out. What is happening is: The upload is going well but the insert in the table (see below) isn't. Now it is creating 2 rows. see the example below
this is the table
d_r_o_p TABLE IF EXISTS `tbl_albums`; CREATE TABLE IF NOT EXISTS `tbl_albums` ( `albumid` int(11) NOT NULL AUTO_INCREMENT, `galleryid` int(4) NOT NULL, `groepspageid` int(4) NOT NULL, `fotogroot` varc_h_a_r(500) COLLATE utf8_unicode_ci NOT NULL, `fotoklein` varc_h_a_r(500) COLLATE utf8_unicode_ci NOT NULL, `toegevoegd` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`albumid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=56 ;
-- -- Gegevens worden uitgevoerd voor tabel `tbl_albums` --
INSERT INTO `tbl_albums` (`albumid`, `galleryid`, `groepspageid`, `fotogroot`, `fotoklein`, `toegevoegd`) VALUES (54, 1, 4, '', '', '2015-02-11 17:38:49'), (55, 54, 0, 'root/DSC_0426.JPG', 'root/DSC_0426_m.JPG', '2015-02-11 17:38:49');
Then the code generated by your extension: (galleryid & groepspageid = vars in the code )
set_time_limit(20000); $dwzUpload_1 = new dwzMultiUpload(); $dwzUpload_1->SetInstance("1"); $dwzUpload_1->SetExtraInfo("Green|_|5400|_|block|_|500,150|_|false|_|AddImages@__@galleryid@__@hidden,AddImages@__@groepspageid@__@hidden"); $dwzUpload_1->SetRedirectUrl("#"); $dwzUpload_1->SetPath("/the/root/|_|1"); $dwzUpload_1->SetTempPath("/the/root/temp|_|1"); $dwzUpload_1->TestEnvironment(); $dwzUpload_1->Init(); $dwzUpload_1->SetRootPath(""); $dwzUpload_1->SetConnPar(@$hostname_deh, @$database_deh, @$username_deh, @$password_deh); $dwzUpload_1->SetTexts("<b>Multiple upload files</b>|_|Upload|_|Start upload files|_|Remove all|_|Remove queued files|_|Stop|_|Stop upload process|_|Total progress|_|Total file size|_|Uploaded size|_|Time elapsed|_|Time remaining|_|Total speed|_|Current speed"); $dwzUpload_1->SetMessages("The file cannot be removed|_|Upload in progress|_|Upload complete|_|Remove file from queue|_|SwfUpload not defined|_|No files selected|_|Upload complete with error|_|Total file size exceed limit"); $dwzUpload_1->SetButtonParameters("/dwzMultipleUpload/Graphics/Green/BrowseButton.png|_|110|_|20|_|Browse...|_|font-family:Arial, Helvetica, sans-serif;font-size:12px;font-weight:bold;|_|font-family:Arial, Helvetica, sans-serif;font-size:12px;font-weight:bold;color:#cccccc;|_|20|_|3"); $dwzUpload_1->SetOverwriteMode("0"); $dwzUpload_1->SetAllowedExtensions("*.gif|_|*.jpg|_|*.jpeg|_|*.png|_|*.bmp"); $dwzUpload_1->SetAllowedExtensionsDescription("Gif Images|_|Jpg Images|_|Jpeg Images|_|Png Images|_|Bmp Images"); $dwzUpload_1->SetSizes("0,0,0"); $dwzUpload_1->SetInsertParameters("1|_|AddImages|_|tbl_albums|_|galleryid@_@galleryid@_@Integer@_@N@_@@_@@_@@_@@_@@_@|@|groepspageid@_@groepspageid@_@Integer@_@N@_@@_@@_@@_@@_@@_@|_|1|_|tbl_albums|_|galleryid|_|galleryid|_|fotogroot|_|fotoklein|_||_||_||_||_||_||_||_|deh"); $dwzUpload_1->SetResizeParameters("0|_|1|_|600|_|400|_|100|_|1|_|1|_|320|_|160|_|100|_|1|_|_m|_|2|_|0|_||_||_|80|_|1|_|_s|_|2"); if($dwzUpload_1->IsPostBack()){ $dwzUpload_1->Save(); }
|
|
|