Loading ...
Sorry, an error occurred while loading the content.

YUI, PHP, MySQL inline editing a table of data

Expand Messages
  • jointtechnologies
    Ok, I m feeling extremely dense here. I downloaded the library and examples. The example for inline editing is pulling it s data from a flat file. data.js.
    Message 1 of 2 , Mar 28, 2007
    • 0 Attachment
      Ok, I'm feeling extremely dense here.
      I downloaded the library and examples.
      The example for inline editing is pulling it's data from a flat file.
      data.js. I've spent hours reading and trying things but I can't
      figure out how the query to get the full table data and then post back
      single fields works.
      I think if I could see a code sample using YUI and php and a table in
      MySQL I could go from there. I think I'm understanding the principle
      but I haven't seen the actually queries and how they are called.

      for instance how could I duplicate
      http://developer.yahoo.com/yui/examples/datatable/inlineediting.html

      assuming the data came from "tablea"
      with coloms:sku,quantity,items,description

      assuming the query to get the table data is
      "SELECT sku,quantity,item,description FROM tablea WHERE blah=blah"

      and the update db code snip is

      $fieldname = $_GET(THEFIELDBEINGUPDATED)
      $content = $_GET(THEDATATOUPDATE)
      $sku = $GET_(THEPRIMARYKEYROWID)
      UPDATE tablea SET $fieldname = $content WHERE sku = $sku

      And I'm only guessing at it being a $_GET. Is that correct?

      thanks

      PHP 4.3.9-3.22.3 / MySQL 4.1.20-1.RHEL4.1
    Your message has been successfully submitted and would be delivered to recipients shortly.