SQL help

wxdqz

New Member
I can't seem to get the ext value from this sql statement..it will only be returning 1 value. any help would be appreciated.


$resultID4 = mysql_query ("SELECT ext FROM filemanager where title LIKE '$title' AND first LIKE '$oldfile'", $linkID);
// $resultID2 = mysql_query ("SELECT CONCAT(first, '.', ext) AS oldfilepath FROM filemanager WHERE title LIKE \"$title\" AND first LIKE \"$oldfile\"", $linkID);
$result = mysql_query("UPDATE filemanager SET first = \"$newfile\" WHERE first = \"$oldfile\" AND title = \"$title\"", $linkID);
// $resultID3 = mysql_query ("SELECT CONCAT(first, '.', ext) AS newfilepath FROM filemanager WHERE title LIKE \"$title\" AND first LIKE \"$newfile\"", $linkID);
print "$resultID4 file extension3";
$oldpath = $oldfile . "." . $ext;
$newpath = $newfile . "." . $ext;

rename("./$oldpath","./$newpath");
 
Back
Top