Togan JR:
私が開いたときに、テーブル値を接続して取得する方法を、PHPで新しい午前にhttp:?//localhost/x/x.phpプッシュ= 1 、私は結果をエコーしようとしていますが、私はそれをしようとすると、それが何を示していません
今私はこのようなやっていると、それは働いていません
<?php
//this block is to post message to GCM on-click
$pushStatus = "";
if(!empty($_GET["push"])) {
$mysqli = new mysqli("localhost", "root", "", "bimbinganpa");
$list_dosen = array();
$test ="test";
$list_dosen = $mysqli->query("SELECT no FROM user_id WHERE tipe_user = mahasiswa");
echo $list_dosen;
$lines=array();
$fp=fopen('GCMRegId.txt', 'r');
while (!feof($fp)){
$line=fgets($fp);
//process line however you like
$line=trim($line);
//add to array
$lines[]=$line;
}
$gcmRegID = file_get_contents("GCMRegId.txt");
$pushMessage = $_POST["message"];
if (isset($gcmRegID) && isset($pushMessage)) {
$gcmRegIds = array($gcmRegID);
$pushStatus = sendPushNotificationToGCM($lines, $pushMessage);
}
}
?>
アントニー・ジャック:
文字列は、クエリ内の引用を必要とします...
あなたは次のように試すことができます
SELECT no FROM user_id WHERE tipe_user = 'mahasiswa'