Forums
This topic is locked
pure php upload delete file before record
Posted 29 Jul 2009 22:00:28
1
has voted
29 Jul 2009 22:00:28 philomena simonenko posted:
Hi,I have noticed a bug for a while with the php upload add on when deleteing file before update or before deleting record.
in the code for delete it looks like this:
// Delete Before Record Addon 1.0.7
if ((isset($_GET['filename'])) && ($_GET['filename'] != "") {
mysql_select_db($database_con1, $con1);
$dbr_result = mysql_query("SELECT filename FROM song WHERE filename=".$_GET['filename'], $con1) or die(mysql_error());
however i have been fixing the code so it now reads:
// Delete Before Record Addon 1.0.7
if ((isset($_GET['filename'])) && ($_GET['filename'] != "") {
mysql_select_db($database_con1, $con1);
$dbr_result = mysql_query("SELECT filename FROM song WHERE filename='".$_GET['filename']."'", $con1) or die(mysql_error());
there was an sql error so WHERE filename=$_GET['filename'] was looking like a column because it needed to be put inside quotation marks so it becomes WHERE filename='$_GET['filename']'
hope this helps someone
Replies
Replied 30 Jul 2009 09:46:33
30 Jul 2009 09:46:33 Patrick Julicher replied:
Hi Philomena,
Would you be so kind to post this issue in the forum from the Pure PHPUpload Addon Pack: www.dmxzone.com/go?4656
This is the place where others might benefit from your solution the most. This is also the place where the developers will be wachting.
Kind regards, Patrick
Would you be so kind to post this issue in the forum from the Pure PHPUpload Addon Pack: www.dmxzone.com/go?4656
This is the place where others might benefit from your solution the most. This is also the place where the developers will be wachting.
Kind regards, Patrick