Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Sep 2013
    Posts
    5
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Post Is it possible to store json stuff in database as json type and doing CRUD operation.

    Hi all coders,
    I am currently developing a project to CRUD json stuff in database as using codeigniter. I donít want to be database specific so I donít relay only on PostgreSQL. So is their a efficient way to manipulate .json stuff(json schema and json form structure data ) in database.
    What would be the procedure.
    I am a newbie in this so please help.
    Thanks in advance..

  • #2
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,133
    Thanks
    12
    Thanked 332 Times in 328 Posts
    I am not aware that you can manipulate a JSON data item that is in a DB in itself (maybe except for string operations). afaik you have to get the data out of the DB to manipulate.
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    Andrť Behrens, NY Times Software Developer

  • Users who have thanked Dormilich for this post:

    Vikas_Web (09-10-2013)

  • #3
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,186
    Thanks
    10
    Thanked 569 Times in 550 Posts
    you would likely have to select the data, modify it w/php, then update back into the DB.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/1/19) IE7:0.2, IE8:6.7, IE11:7.4, IE9:3.8, IE10:4.4, FF:18.3, CH:43.6, SF:7.8, MOBILE:27.5

  • Users who have thanked rnd me for this post:

    Vikas_Web (09-10-2013)

  • #4
    New to the CF scene
    Join Date
    Sep 2013
    Posts
    5
    Thanks
    3
    Thanked 0 Times in 0 Posts
    in my project i am dealing with json string in js function . when press a button a json string the transfered to jsonform.js function and i get a html component..
    Code:
    function startup(){
    	$('#form').jsonForm(
    {
        "schema": {
    "frmName":
      {
        "type"          :   "text",
        "minlength"     :   "0",
        "maxlength"     :   "600",
        "required"      :   "TRUE",
        "multilanguage" :   "FALSE",
      }
    	}
      }
    );
    after i save the generated form the vales a retrieved as json .. now i want to store it in a database . so please suggest me a database generic active record method to preform CRUD operation .

  • #5
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,133
    Thanks
    12
    Thanked 332 Times in 328 Posts
    use Codeigniter’s own Active Record.
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    Andrť Behrens, NY Times Software Developer


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •