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

Re: [ydn-javascript] import data in "Data Table"

Expand Messages
  • Satyam
    http://www.satyam.com.ar/yui/#phpjson
    Message 1 of 2 , Jul 3, 2009
    • 0 Attachment
      http://www.satyam.com.ar/yui/#phpjson

      bahalul kabir escribió:
      >
      >
      > I have php script and I have data from database.
      > How can I import these data in "data Table".
      >
      >
      > for example:
      > php code:
      >
      > while($res=mysql_fetch_assoc($query))
      > {
      > $Id=$res["ID"];
      > $quantity=$res["quantity"]
      > $amount=$res["amount"];
      > $title=$res["title"];
      > }
      >
      > -------- javascript code -------
      > YAHOO.example.Data = {
      > bookorders: [
      > {id:"id1", date:new Date(1980, 2, 24), quantity:1, amount:4,
      > title:"A Book About Nothing"},
      > {id:"id2", date:new Date("January 3, 1983"), quantity:null,
      > amount:12.12345, title:"The Meaning of Life"},
      > {id:"id3", date:new Date(1978, 11, 12), quantity:12,
      > amount:1.25, title:"This Book Was Meant to Be Read Aloud"},
      > {id:"id4", date:new Date("March 11, 1985"), quantity:6,
      > amount:3.5, title:"Read Me Twice"}
      > ]
      > }
      >
      > -------------------------------------------------
      > if anyone can give an idea.
      >
      > Kabir
      >
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - www.avg.com
      > Version: 8.5.375 / Virus Database: 270.13.2/2215 - Release Date: 07/02/09 18:06:00
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.