How to guide NoSQL app online step by step

NoSQL app by CmxAds.com a portable text database app builder

Basic process: (1)Create table. (2)Insert data. (3)Create code. (4)Create another table. ditto

NoSQL app is similar to SQLite but better. The database is humanly readable, editable and totally portable.
Driven by a database engine that supports the most commonly used SQL statements.
Capable of handling up to medium size website applications. Certainly not an Amazon app!

Step 1

    When you access the home page you will be required to enter a username and a project name which will be your project directory.
    This is where all your generated code will be copied too. You must record your username/project name as there is no recovery if you forget.

Step 2

    Create tables for your project. Name your tables by the name you want the directory to be.
    The table name is the directory for that level of the web application you are building.
    If you want a store directory create a store table. Cart table, login table member area table etc etc.
    Lets say for a shop create a form with the hidden fields. You can copy and paste this file
    later when you are adding products and edit. The Cart form would be for user checkout info.
    The actually shopping cartwould be a seperate utility with add to cart directed to it.
    I have plenty of addon carts including crypto.

Step 3

    Insert some preliminary data into your table as you cannot edit or proceed to next step without inserting some data in the new table/s.
    If you do not insert any data during initial creation of table it can be done thru the 'list edit tables' link by clicking insert data.
    Note: With clicking the CRUD edit link feature you cannot add data to an empty table. Use insert data first. Then CRUD is enabled. CRUD is listing all table data for editing.

Step 4

    After creating a table and inserting data. The next step is to create the web app pages for data insertion.
    Click on the List tables, edit and create code link and click create insert form and code.
    You can choose from post, get or ajax post for insert data form creation. Ajax post is by input class which is set for 'Class' now.
    Note: you must create the insert form and code first as this step copies most of the core scripts and code for your web app.
    You can always delete pages you do not want from the table name directory later if you desire.

Step 5

    Create edit and update form and code.
    Click on the List tables, edit and create code link and click create edit/update form and code.
    Again you can choose from post, get or ajax post for insert data form creation. Ajax post is by input class which is set for 'Class' now.
    You can always delete pages and links you do not want from the table name directory later if you desire.

Step 6

    Create CRUD, create read, update and delete code.
    Click on the List tables, edit and create code link and click create CRUD code.
    This will generate a CRUD grid for editing your table in that directory.
    Usefull for admin editing. The generated link can be removed from the templates/TABLENAME_link.php file if desired.

Step 7

    Repeat the above steps for another table or task for your web application.
    One table at a time. Create table. Add data. Create code. Repeat.

Step 8

    After generating all the tables and code you need for your application click the Download your project link.
    You can download the zip file of what you built and delete the original web app directory from the server.
    You can then upload the folder to your webhost. Then go to install.php you set the include paths.
    You will then be directed to the index page. Thats it. Edit app logic as you desire.

Structure of you NoSQL app Web App

    Each table you create is a directory. So set up you app with this in mind.
    If you want a login create a login table. If you want a members area set a members table etc etc.<
    In config.php you can set which directories are password protected and set where they will be redirected to login.
    If redirected to members for example to login. It would be members/enter_members.php page in the members directory.
    You will need to modify code to set the session for authenication.
    incs/security.php holds the session check function. Set for validuser now. Also see incs/utilities.php and incs/filters.php for validation.

More notes

    Most of the basic core logic is dynamic function based.
    If the task is returning a SQL statement the code is in incs/sql-functions.php. Except for SELECT
    the update and insert sql statements are dynamic function built. Update is by id only now.
    Again see the function file to edit functions for the logic your app needs. There are other variations to choose from.

SQL statement limitations

    Most of the widely used basic SQL statements are supported.
    A SELECT statement example: SELECT * FROM TABLE WHERE location = 'NYC' and state = 'NY' ORDER BY date DESC LIMIT 1,5
    Shown is what all is supported. What is required? * nothing else. Up to 2 conditions supported operators are !=, = , <=, >=
    OR, AND, NOT and XOR only. Order by and DESC or ASC are required. When using LIMIT with 2 values the first value must be a 1 not a 0 when using 2 conditions.

    INSERT statement format.
    A INSERT statement example: INSERT INTO table (field1, field2) VALUES ('value1', 'value2')
    Must be exactly as shown or will fail.

    UPDATE statement format.
    NOTE: update statement cannot have spaces between field and update values.
    Example update: UPDATE table SET field1='data1',field2='data2' WHERE field3='data3' and field4!='field5'
    This is important of will fail

    DELETE statement format.
    DELETE FROM table WHERE field1 = 'value3' and field2 = 'value4'
    Max 2 conditions with all statements

SQL function support

    SQL Functions supported are.
    num_rows
    fetch_array
    update($table)
    insert_id($table)
    createtable()
    getfields($table)
    delete_table($table)
    row_count($table) returns total table rows