Been at this for hours and hours without end debugging why my CREATE TABLE
statement failed.
Tested it within a MySQL
database and it works just fine. But for some reason all my SELECT's can't get my login table like it doesn't exists(The error says).
Here is my SQL
for creating the table.
CREATE TABLE IF NOT EXISTS login(
id SMALLINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
user_type SMALLINT NOT NULL,
user_data text NOT NULL,
created_on datetime NOT NULL DEFAULT "0000-00-00 00:00:00"
);
I just cannot see where the error is. One other major issue is that after hours while googling i haven't found any solid wiki that provides enough information about the API
for me to really use it. So i had to jump around from site to site to get bites of information.
Hope someone can help me sort out the issue with the Query
.
Just as a friendly note, the WebSQL Standard isn't recommended: Is it recommended to use the web sql database for storage on the client side
For a different Client-Side Relational Database Solution, try: SequelSphere
It is an HTML5 Relational Database Engine that supports SQL and stores it's data in Local Persistence. It does not use WebSQL databases, but rather is its own SQL engine. As such, it will work in any JavaScript compliant browser. While it currently only supports Local Storage, very soon SequelSphere will support other local persistence engines such as IndexedDB and File API.
For full disclosure: I am related to the company SequelSphere. :)
I am sry for posting the issue. Already found what i done wrong. Here is the solution for anyone else who might encounter the same thing.
I simply wrote "AUTO_INCREMENT" as in MySQL where i had to be "AUTOINCREMENT" without the _