Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    May 2009
    Posts
    32
    Vote Rating
    0
    casic has a little shameless behaviour in the past

      0  

    Default How to save data.store to mysql using php

    How to save data.store to mysql using php


    I have data view and a grid . I use Drag and drop from DataView to Grid. I want to save all Grid's rows at once with php scripts, but i don't know how to send grids.store to PHP and how to iterate it to insert row by row to mysql. Please HELP .

  2. #2
    Sencha User
    Join Date
    Oct 2009
    Location
    Bucharest, Romania
    Posts
    70
    Vote Rating
    0
    icflorescu is on a distinguished road

      0  

    Default


    If your store's proxy has a properly configured writer you can do a store.sync() to send data to the server.
    About the PHP part, it depends on many things like your level of experience with it (you might want to begin here), are you using a server-side application framework (like Kohana or CodeIgniter), etc...

    Simplest theoretical build-from-scratch approach would be to define an ajax proxy for your store, call store.sync() when you want to upload your records, and then on the server-side decode your $_POST variable and decide what to do with its content.

  3. #3
    Sencha User
    Join Date
    May 2009
    Posts
    32
    Vote Rating
    0
    casic has a little shameless behaviour in the past

      0  

    Default


    I have Json.store to load data for DataView store. Then i create empty data store for the grid.
    With Drag And Drop from DataView I add rows to Grid . Then i want to save all records from Grid to mysql table. I just want to know how to send params Grid.Store to php script and how _POST['store'] to be parsed in PHP ?

  4. #4
    Sencha User
    Join Date
    May 2009
    Posts
    32
    Vote Rating
    0
    casic has a little shameless behaviour in the past

      0  

    Default


    This way work. But i think that this is very bad programing practice .
    Please show the smart way.

    function SaveOrder(){

    firstGridStore.update ;
    var grid_rows =firstGridStore.getCount() ;
    if(grid_rows > 0) {

    // make all id from data selected become 1,2,3,4,5,.....

    var id = '';
    var br = '';
    var price = '' ;

    var i = 0;

    for(i=0; i<grid_rows ; i++) {
    id += firstGridStore.getAt(i).data.id;
    br += firstGridStore.getAt(i).data.color;
    price += firstGridStore.getAt(i).data.price;


    if(i < (grid_rows - 1)) {
    id += ','; br +=',' ; price +=',' ;
    }
    }



    Ext.Ajax.request({
    waitMsg: 'Please wait...',
    url: 'order.php',
    params: {
    // task: "UPDATEPRES",
    user_id: user.id,
    suma: smetka,
    art_id: id ,
    broj: br ,
    price: price

    },

Similar Threads

  1. Example of editor-grid using php and mysql to save data
    By bd318 in forum Community Discussion
    Replies: 96
    Last Post: 14 Jun 2012, 9:36 AM
  2. how to clear store.modified data after save the data!
    By pclovec in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 1 May 2011, 12:16 AM
  3. Save and Get custom data from store
    By direct00 in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 27 Jan 2011, 12:10 PM
  4. Save Data Store
    By putty in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 29 Aug 2010, 8:06 PM
  5. save data store to database
    By mnask in forum Ext 2.x: Help & Discussion
    Replies: 8
    Last Post: 3 Apr 2008, 6:56 PM

Thread Participants: 1