This is a forum where members new and old can come to ask questions and get info and opinions. It is not a place to advertise your business or have other forms of advertising, whether it be in your posts or signature.

All links in the forum will not be indexed by Search Engines and any unapproved forms of advertising or spam will be dealt with accordingly, deleted, and that member's account banned.

Forums

Overview » Bugs » pure php upload delete file before record
Reply

pure php upload delete file before record

philomena simonenko
Member



Since: 31 May 2003
Posts: 1
Posted 29 Jul 2009 22:00:28

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

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
Patrick Julicher
Official Representative



Since: 04 Feb 2002
Posts: 1,208
Replied 30 Jul 2009 09:46:33
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

Reply to this topic

Message
Reply
Follow us on Facebook Follow us on twitter Subscribe to the RSS feed
Activate your free membership today | Login | Currency