7 Replies Latest reply on Sep 2, 2008 9:39 PM by fypstudent

    Creating Timetable using Datagrid

    fypstudent
      Hi, can anyone help me with this problem?

      I want to do a class timetable displaying on datagrid.

      I have a CSV file which shows all the staff's timetables together. The picture shown below:
      Picture can be seen in here:
      http://i192.photobucket.com/albums/z63/nellehs/Picture5.png


      The datagrid which I do now manage to draw individual staff timetable from the database of all staff table. What I did for this is using PHP and <mx:request> in flex. The following are some codes which I had did to draw individual staff's timetable.

      In Flex:
      <mx:HTTPService id="allData"
      url=" http://localhost/timetableTest/src/scripts/timetable.php"
      result="timetableHandler(event)" method="POST" showBusyCursor = "true">
      <mx:request xmlns="">
      <staffid>{selectedProfileID.staffid}</staffid>
      </mx:request>
      </mx:HTTPService>

      In PHP:

      $staffid = mysql_real_escape_string($_POST["staffid"]);
      $sql = "SELECT * FROM timetable WHERE staffid = '$staffid'";

      What is display:
      Picture can be seen in here
      http://i192.photobucket.com/albums/z63/nellehs/Picture2.png

      Current, what it displaying now is all the result return from the PHP file. Meaning it is not sort into the correct time and day. It should sort into the time and day such as this example:

      Picture can be seen in here:
      http://i192.photobucket.com/albums/z63/nellehs/Picture1.png

      Anyone can help?
      Thanks! Text