-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetmentions.php
More file actions
executable file
·30 lines (25 loc) · 1022 Bytes
/
getmentions.php
File metadata and controls
executable file
·30 lines (25 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php $sqlpath = $_SERVER['DOCUMENT_ROOT'];
$sqlpath .= "/sql-connect.php";
include_once($sqlpath);
$mentionList = array();
$sql = "SELECT title,id FROM notes WHERE lineage NOT LIKE '%-1515-%'";
$sqldata = mysqli_query($dbcon, $sql) or die('error getting data');
while($row = mysqli_fetch_array($sqldata, MYSQLI_ASSOC)) {
$notemention = '@'.$row['title'];
array_push($mentionList, $notemention, $row['id']);
}
/*$sql = "SELECT title,id FROM notes WHERE lineage LIKE '%-1515-%'";
$sqldata = mysqli_query($dbcon, $sql) or die('error getting data');
while($row = mysqli_fetch_array($sqldata, MYSQLI_ASSOC)) {
$tagname = '#'.$row['title'];
array_push($mentionList, $tagname, $row['id']);
}*/
/*
$postgres = "SELECT * FROM oc_filecache WHERE path LIKE 'files/Documents%'";
$result = pg_query($cloudcon, $postgres);
while ($row = pg_fetch_assoc($result)) {
$cloudname = '#'.$row['path'];
array_push($mentionList, $cloudname, $row['fileid']);
}*/
echo json_encode($mentionList);
?>