For my project, these two queries don't work. The sqlite manual says to use 'qualified-table-name'
but if I do (flist.fdata) an error is returned 'no such table'. As they are below no errors are returned, but
the database table is not affected.
if (isset ($_POST['del'])) {
$id = $_POST['id'];
$titl=$_POST['titl'];
$db = sqlite_open('data/flist.sqlite', 0666, $sqliteerror);
sqlite_query($db,"DELETE FROM fdata WHERE id='$titl'");
header('location:index.php');
sqlite_close($db);
}
if (isset ($_POST['alter'])) {
$id=$_POST['id'];
$title=$_POST['titl'];
$art=$_POST['art'];
$cat=$_POST['cat'];
$len=$_POST['len'];
$db = sqlite_open('data/flist.sqlite', 0666, $sqliteerror);
sqlite_query($db,"UPDATE fdata SET title='$title',artist='$art',
category='$cat',length='$len' WHERE id='$id'");
header('location:index.php');
sqlite_close($db);
}
I've also tried 'main.fdata' but that doesn't work either.
Can someone point me in the right direction please, I bet I'm missing something simple!