facebook

Read & Wright to and from DB

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #348897 Reply

    richardjmanning
    Participant

    Hello.

    I am reasonably new to mobile programming, and I am having some problems finding a tutorial which is easy to follow.

    I need to be able to read and wright to and from a database so for example the database would look like this

    Email # username # password # job
    #####################################
    mailto:example@12.com # example1 # example # job1
    mailto:example@12.com # example1 # example # job2
    mailto:example@12.com # example1 # example # job3
    mailto:example2@12.com # example2 # example # job1
    mailto:example2@12.com # example2 # example # job2

    I need a page which lists all jobs for the email “example@12.com”
    Then when they press job1 for example their are two labels their that diaply their username and password.

    I need them to also be able to add an account ass well so that would be a simple form to make
    Email textbox
    username textbox
    Password Textbox
    Job textbox
    And then an update button that would add it to the database

    Now for the hard bit all this needs to be done via javascript and it a sql database hosting with myphpAdmin
    I know this is not the proper way of doing it but its the way it HAS to be done for the application I am making

    Thank you for any help.
    Richard manning

    #348911

    Code_A
    Member

    All of this is possible within M1. Here is the general overview of how I establish communication between my app and a server-side database.

    One the server side…
    Create your mySQL DB on your web server. Then develop a web service interface to access the DB. This consists of PHP code to handle the database operations such as Select, Insert, etc. (I use the Code Igniter as my PHP framework), and also a REST controller to transfer the data back to the app in a organized format (xml, json,etc.)

    On the client (app) side…
    You can use AJAX to call the PHP functions on your web server to send and receive data between your app and server. If you are using passwords for authentication, then I would suggest using an encryption algorithm to encrypt the data before sending back and forth across the web.

    #348962

    richardjmanning
    Participant

    thank you for your reply but I relized this part from other posts on the topic from the forums but I am unable to find a good tutorial to
    follow that is specific to mobi one and this is the first time I have ever done anything like this as usually I devlope in VBA or C#

    So my request was more for someone to link me to a GOOD step by step tutorial on how to achive this please.

    Thank you

    #348974

    Code_A
    Member

    Once you get your server side DB and interface setup, here is an example from tguneysu of how to use AJAX within M1 to communicate with your server DB [viewtopic.php?f=19&t=6667]. I used this example to get my app connected to my web service.

    Have you looked at the Websql CRUD with Custom List Example? This may be helpful too, although it uses a local DB.

    I am not sure you will find a complete step-by-step tutorial here that includes the server side setup too since M1 deals with the client-side only (although, I have not scoured these forums looking so I cannot confirm).

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Read & Wright to and from DB

You must be logged in to post in the forum log in