I am having trouble any time i use bind_param twice in one file.
$stmt = $mysqli->prepare('SELECT url FROM photo WHERE album =?');
$stmt->bind_param('i', $set);
$stmt->execute();
$stmt->bind_result($url);
while ($stmt->fetch()) {
$stmt1 = $mysqli->prepare('DELETE FROM photo WHERE url=?');
$stmt1->bind_param('s', $url);
$stmt1->execute();
unlink($url);
}
I get an error on this line:
$stmt1->bind_param('s', $url);
This is the error:
Fatal error: Call to a member function bind_param() on a non-object in
I have looked all over the place to try find a solution but I haven't so far.
Thanks, Waq