Found the answer. Needed to use mysql_fetch as below.
$query = mysql_query("select p.path from path as p join file as f on p.pathid=f.pathid where f.filename like '$xfilename' and p.path like '/Data/original%'");
$f="https://forum.tuteehub.com/tag/result">result = mysql_fetch_row($query); system("echo '$f="https://forum.tuteehub.com/tag/result">result**[0]**' >> /Report/sqloutput");
manpreet
Best Answer
2 years ago
I have a PHP script that connects to one of my SQL databases and runs a select command. I'm then trying to see what the output is of command but when I f="https://forum.tuteehub.com/tag/echo">echo my results to a file I get "Resource id #f="https://forum.tuteehub.com/tag/5">5" and not a path like I'm expecting. Can anyone tell me where I'm going wrong, I suspect it is the query or the result variable but I'm pretty new to php.