Hi
I am dipping my toe in the water of prepared statements, and my function below is not working, i am getting nothing returned where I expect to see some content in my page:
function getPageText($url) {
global $dblink;
$qry = "SELECT content FROM tblsections WHERE url = ?";
if ($stmt = $dblink->prepare($qry)) {
$stmt->bind_param("s",$url);
$stmt->execute();
$stmt->bind_result($content);
$stmt->close();
return str_replace("/documents/editorfiles/","/repository/documents/editorfiles/",$content);
}
}
I am not sure how to debug prepared statments, normallly with a mysqli_query() I would just put a die statement on the end which would tell me the problem.
Thank you for any advice in advance.