UPDATE, INSERT, DELETE on a localhost SQLite db file?

132
December 17, 2018, at 6:50 PM

I'm trying to consolidate a 20 year old project into one platform where I've been taking a series of results from text files, importing them into FoxPro or Access in the past, then migrating them to MySQL so I can generate an HTML page and send to my client.

So I've been developing a HTML5/PHP page with JavaScript where I can simply press task buttons to do things in steps all in one place and while I've got almost everything I need in place, there's one last thing that's holding me up from completing this.

I was trying to move completely off of Microsoft Access since I'll be getting a new PC soon and don't want to purchase it only for this project, so I've learned up as much as I could with SQLite to at least accomplish what I need to do. It's great for the SELECT statements and in PHP I was able to figure how to do the custom functions I needed to do to accomplish the calculations I needed. So when I initially tried to do a DELETE statement from my PHP page it didn't seem to work.

When I'm in the DB Browser for SQLite, I can type in the following SQL statement:

select * from bb1;

and it returns 842 rows returned in 5ms from: select * from bb1;

But when I enter:

delete FROM bbimport;

it returns unable to open database file: delete FROM bbimport;

Which leads me to believe that on a localhost all files are readonly, and I attempted to go into windows explorer to make my folder readonly and it still didn't work even when I'm the administrator on my workstation.

So the question is, can I still be able to do PHP db->exec statements successfully on a localhost, and if so then how? If not I suppose I could use MySQL again but don't necessary want to have to.

Rent Charter Buses Company
READ ALSO
Difficult PHP Nested Regular Expression [duplicate]

Difficult PHP Nested Regular Expression [duplicate]

This question already has an answer here:

148
I want to modify the “Add to Cart” button of the products of certain type of store

I want to modify the “Add to Cart” button of the products of certain type of store

In a custom module for Drupal Commerce, I want to modify the "Add to Cart" button of the products of certain type of store

120
Using parameter in stored procedure to get dynamic table name

Using parameter in stored procedure to get dynamic table name

I already wrote a pretty complex stored procedure, but now i want to bring some dynamics into the procedures using variablesI still call myself a newbiew when it comes to sql programming, so i might be totally on the wrong way with what i'd like to achieve

133