lawang code

lawang Code


Tanyakan kode disini

Notice: Trying to get property of non-object in /storage/ssd3/957/3037957/public_html/hasilquery.php on line 23

ditanyakan oleh Bagas 8 bulan yang lalu

Eror line 23

<?php

//https://dev.mysql.com/doc/refman/5.5/en/fulltext-boolean.html`
//ALTER TABLE dokumen
//ADD FULLTEXT INDEX `FullText` 
//(`token` ASC, 
//`tokenstem` ASC);

$servername = "localhost";
$username = "id3037957_localhost";
$password = "bagasdhika";
$dbname = "id3037957_dbstbi";
$katakunci="";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$hasil=$_POST['katakunci'];
//$sql = "SELECT distinct nama_file,token,tokenstem FROM `dokumen` where token like '%$hasil%'";
$sqli = "SELECT distinct nama_file,token,tokenstem,tokenstem2 FROM `dokumen` WHERE MATCH (token) AGAINST ('$hasil' IN BOOLEAN MODE)";
$result = $conn->query($sqli);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "<br>" ."Nama file: " . $row["nama_file"]. " - Token: " . $row["token"]. " " . $row["tokenstem"]. " " .$row["tokenstem2"]. "<br>";
}

} else {

echo "0 results";
}

$conn->close();
///
?>









Anda harus login terlebih dahulu untuk memberikan komentar

Recent Tag

X 6
X 48
X 14
X 10
X 1
X 5
X 4
X 13
X 10

Bantuan

Help

Feedback

Help