topical media & game development

talk show tell print

student-wave-nm1-getPos.php / php



  <?php
  /*@ get position
          include("student-wave-nm1-inc-connect.inc");
          // get all positions from db
          query = mysql_query('SELECT x,y,name FROM position');
  
          // convert to json ( http://en.wikipedia.org/wiki/JSON )
          rows = array();
          while(r = mysql_fetch_assoc(query)) { rows[] = r; }
          json = json_encode(rows);
          echo json;
          exit();
          
          
          
          /*
                  TODO Test performance of json-transform - possible bottleneck.
  	*/
  ?>
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.