[eluser]René Tuin[/eluser]
Hi all,
I have the following problem.
I have a update functie which I build in php, only I get the following error.
'SQLSTATE[HY000] [14] unable to open database file'
Here is my code:
Code:
<?php
try {
/*** connect to SQLite database ***/
$db = new PDO('sqlite:http://localhost/IRS/CMS_Codeignitor/website.sqlite');
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$error = $db->errorInfo();
if($error[0] != "") {
print "<p>DATABASE CONNECTION ERROR:</p>";
print_r($error);
}
foreach ($_GET['listItem'] as $position => $item) {
$sql = "UPDATE Pages SET Volgorde = $position WHERE id_Pages = $item";
$db->exec($sql);
}
}
catch(PDOException $e)
{
echo $e->getMessage();
}
?>
I can build this update functie with the framework because I call this functie with AJAX HTTP Request.
So I must build it with php.
So i hope someone can help me.