When trying to get the url from pdf_temp I get no result when I use $tag and yet if I hard code the SQL it works.
I don't know why?
Does anyone have any ideas?
Code: Select all
function getPDFURL($tag){
$sel = "SELECT * FROM pdf_temp WHERE pdf_tag = 'nu2044536547'"; // this is the only SQL that returns a record
$sel = "SELECT * FROM pdf_temp WHERE pdf_tag = '$tag'";
$tab = nuRunQuery($sel);
$rec = db_fetch_object($tab);
nudebug('URL - ', "SQL : $sel", "TAG : $tag"); // If I paste the SQL created here into phpMyAdmin it returns a record.
return $rec->pdf_file_name;
}
Steven