2 Replies Latest reply on Jun 26, 2010 3:56 PM by jatin4rise

    Need help in retreiving values via PHP script

    jatin4rise

      Thanks for help.

       

      1 This following query suceesfuuly executes and returs me the following result.

       

      SELECT homeId
      FROM Homes
      LIMIT 0 , 30

       

      SQL result

      Host: localhost
      Database: countries
      Generation Time: Jun 26, 2010 at 04:46 PM
      Generated by: phpMyAdmin 3.2.4 / MySQL 5.1.41
      SQL query: SELECT homeId FROM Homes LIMIT 0, 30 ;
      Rows: 8

      homeId
      1
      2
      3
      4
      5
      6
      7
      8
      unknown table status: TABLE_TYPE

      But when i try to retrieve this values from DB, using php script/ My resullt handler, doesnt provide me valid values.

      Following i smy php script.

      -----------------------------------------------------
      <?PHP

      mysql_connect("localhost:3306", "username", "password");
      mysql_select_db("countries");

      $result = mysql_query("SELECT homeId FROM Homes");

      echo "<?xml version=\"1.0\" ?><map>";

      while($row = mysql_fetch_assoc($result))
      {
          echo "<lat>" . $row[homeId] . "</lat>";
      }

      echo "</map>";
      ?>

      -----------------------------------------------------

      When i debugg, i get this incorrect value.

      -------------------------------------------------------error.jpg