XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • # Replies:
      1
    • Last comment by Customer:
      false

      Description

      .I have already tried this before but it was not working. i have tried so many different2 ways but i'm not able to fetch the data it is just showing mongocursor Object(). In java it is working properly but with php i'm nit able to fetch the data.
      <?php
      $mac = $_POST['mac'];
      $T1 = $_POST['time1'];
      $T2 = $_POST['time2'];
      $d1=new MongoDate(strtotime($T1));
      $d2=new MongoDate(strtotime($T2));
      $server = "mongodb://localhost:27017";
      $conn = new Mongo($server);
      $db = $conn->selectDB('WirelessAp');
      echo "Database WirelessAP selected";
      $collection = new MongoCollection($db, 'coldata2');
      $data = array('timestamp' => array('$gt' => $d1,'$lt' => $d2));
      $cursor = $collection->find($data);
      print_r($cursor);
      foreach ($cursor as $doc)

      { var_dump($doc); }

      ?>

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              achopra Arpita Chopra
              Participants:
              Last commenter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since reply:
                3 years, 33 weeks, 4 days ago
                Date of 1st Reply: