Lethal
06-03-2003, 08:20 AM
I ran into a problem when I was posting on my board and it points to this code in the newreply.php file.
$attid = array();
$atts = $DB_site->query("SELECT * FROM attachment_tmp WHERE threadid='$threadid' AND poststarttime='$poststarttime' AND userid='$bbuserinfo[userid]'");
while($att = $DB_site->fetch_array($atts)) {
$DB_site->query("INSERT INTO attachment (attachmentid,userid,dateline,filename,filedata,vi sible,postid) VALUES (NULL,$bbuserinfo[userid],".time().",'".addslashes($att[filename])."','".addslashes($att[filedata])."','$att[visible]','$postid')");
$attid[] = $DB_site->insert_id();
$DB_site->query("DELETE FROM attachment_tmp WHERE attachid='$att[attachid]'");
}
$attids = implode(",", $attid);
$attids = iif($attids=="",$attids=0,$attids);
My board is hacked pretty good and I went through all my hacks to see if I can find which one it was and had no luck. I must have installed one and decided not to use it and forgot to change this code back to the original. The error it gives is this:
Invalid SQL: SELECT * FROM attachment_tmp WHERE threadid='19' AND poststarttime='' AND userid='1'
mysql error: Table 'attachment_tmp' doesn't exist
mysql error number: 1146
the attachment_tmp table sounds so familiar. I know I have seen it somewhere before but can't figure it out. I am going to search again to see if I missed it somewhere. I tried searching all the attachment hacks here but no luck either. I thought it was firefly's attachment editor hack that I have installed but I didn't find that anywhere in the instructions. Any help would be much appreciated.
$attid = array();
$atts = $DB_site->query("SELECT * FROM attachment_tmp WHERE threadid='$threadid' AND poststarttime='$poststarttime' AND userid='$bbuserinfo[userid]'");
while($att = $DB_site->fetch_array($atts)) {
$DB_site->query("INSERT INTO attachment (attachmentid,userid,dateline,filename,filedata,vi sible,postid) VALUES (NULL,$bbuserinfo[userid],".time().",'".addslashes($att[filename])."','".addslashes($att[filedata])."','$att[visible]','$postid')");
$attid[] = $DB_site->insert_id();
$DB_site->query("DELETE FROM attachment_tmp WHERE attachid='$att[attachid]'");
}
$attids = implode(",", $attid);
$attids = iif($attids=="",$attids=0,$attids);
My board is hacked pretty good and I went through all my hacks to see if I can find which one it was and had no luck. I must have installed one and decided not to use it and forgot to change this code back to the original. The error it gives is this:
Invalid SQL: SELECT * FROM attachment_tmp WHERE threadid='19' AND poststarttime='' AND userid='1'
mysql error: Table 'attachment_tmp' doesn't exist
mysql error number: 1146
the attachment_tmp table sounds so familiar. I know I have seen it somewhere before but can't figure it out. I am going to search again to see if I missed it somewhere. I tried searching all the attachment hacks here but no luck either. I thought it was firefly's attachment editor hack that I have installed but I didn't find that anywhere in the instructions. Any help would be much appreciated.