Hi everyone
Im totally stumped by what im sure is a straight forward issue. I am using the below function to move the details of a users announcement from one table to an identical table, the content of the latter is published on the website, the first is not. My problem is that when there is an associated file with the announcement it fails to insert it into the announce table. If there is no file the insert works fine. The only diffrence between no file and there being a file is that 'filepath' has a value which is something like 'c:\documents\test file.txt' would the slashes or colon cause an issue in the SQL?
function confirm_announce ($annoid) {
$query = "INSERT INTO announce( annoid, memid, postdate, subject, body, filepath, docid)
SELECT * FROM announcetemp WHERE annoid = '$annoid'";
$res = mysql_query($query) or die ('could not insert announcement into annouce table.');
//then delete original row in announcetemp
$setquery = "DELETE FROM announcetemp WHERE annoid = '$annoid' ";
$setres = mysql_query($setquery) or die ('could not delete announcement from announcetemp.');
}
Any help would be really apreshiated 🙂