root/feedmelinks/_config/SQL/QUERIES.txt

Revision 375, 4.5 kB (checked in by hirokai, 5 years ago)

misc, for ref.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 $qs = "INSERT into linksComments values(NULL, '$submitter', '$comment', $isPrivate );";
2 $qs = "DELETE from links where ID = $id";
3 $qs = "DELETE from links where submitter = '$sessionUserId' AND groupid = $id";
4 $qs = "DELETE from linksGroups where ID = $id";
5 $qs = "INSERT INTO linkMetrics (linkID, date, user, source ) VALUES ( $linkID, NULL, '$u', 'unused' );";
6 $qs = "INSERT into links values(NULL,'$url','$name', NULL, NULL,'$submitter', LAST_INSERT_ID(), '$options', $isPrivate );";
7 $qs = "INSERT into links values(NULL,'$url','$name', NULL, NULL,'$submitter',$groupid, '$options', $isPrivate );";
8 $qs = "INSERT into linksCommentsXRef values( $linkID, $commentID );";
9 $qs = "INSERT into linksGroups values(NULL,'$sessionUserId','$name','');";
10 $qs = "INSERT into linksGroups values(NULL,'$sessionUserId','$newFolderName','');";
11 $qs = "INSERT into linksGroups values(NULL,'$userId','$folder','');";
12 $qs = "INSERT into linksUsers values(NULL,'$userId','$email', '$password', '$name','');";
13 $qs = "REPLACE into links values($id,'$url','$name','$createDate',NULL,'$submitter',$groupid,'$options', $isPrivate);";
14 $qs = "SELECT $field from links WHERE ID = $argId";
15 $qs = "SELECT $field from linksGroups WHERE ID = $argId";
16 $qs = "SELECT * FROM linksUsers WHERE email = '" . urlencode( $email ) . "';";
17 $qs = "SELECT * FROM linksUsers WHERE userid = '" . urlencode( $userId ) . "';";
18 $qs = "SELECT * FROM linksUsers WHERE userid = '$userId'";
19 $qs = "SELECT * from links WHERE isPrivate IS NULL ORDER BY createDate DESC";
20 $qs = "SELECT * from links WHERE isPrivate is NULL ORDER BY createDate DESC";
21 $qs = "SELECT * from links WHERE submitter='$user' ORDER BY createDate DESC";
22 $qs = "SELECT * from links as l, linksComments as x $whereClause ORDER BY $sortOrder $direction";
23 $qs = "SELECT * from links where ID = '$id'";
24 $qs = "SELECT * from links where ID=$id AND submitter='$sessionUserId'";
25 $qs = "SELECT * from links where ID=$l";
26 $qs = "SELECT * from linksGroups $whereClause ORDER BY name";
27 $qs = "SELECT * from linksGroups WHERE id=$folder";
28 $qs = "SELECT * from linksGroups WHERE userId = '$sessionUserId' ORDER BY name ASC";
29 $qs = "SELECT * from linksGroups WHERE userId = '$sessionUserId' ORDER BY name";
30 $qs = "SELECT * from linksGroups where userid = '$sessionUserId' ORDER BY name";
31 $qs = "SELECT * from linksGroups";
32 $qs = "SELECT * from linksUsers ";
33 $qs = "SELECT * from linksUsers ORDER BY $orderBy";
34 $qs = "SELECT * from linksUsers WHERE userId = '$sessionUserId'";
35 $qs = "SELECT * from linksUsers WHERE userId = '$userId'";
36 $qs = "SELECT * from linksUsers WHERE userid = '$userId'";
37 $qs = "SELECT DISTINCT linkID, COUNT(*) as clicks FROM linkMetrics GROUP by linkID ORDER BY clicks desc limit $selectMax;";
38 $qs = "SELECT DISTINCT user, COUNT(*) as clicks FROM linkMetrics GROUP by user ORDER BY clicks desc limit $selectMax;";
39 $qs = "SELECT DISTINCT( url), submitter, groupid, id, createDate, name  from links WHERE isPrivate is NULL GROUP BY url ORDER BY createDate DESC";
40 $qs = "SELECT DISTINCT(l.url), l.name, l.submitter, l.createDate, l.ID FROM links as l WHERE l.isPrivate is NULL GROUP BY url ORDER BY createDate DESC;";
41 $qs = "SELECT count(*) FROM links WHERE submitter = '$user';";
42 $qs = "SELECT count(*) from links WHERE groupid = $id";
43 $qs = "SELECT createDate from links ORDER BY createDate";
44 $qs = "SELECT email from linksUsers WHERE userid = '$argUser'";
45 $qs = "SELECT groupid from links WHERE ID = $argId";
46 $qs = "SELECT name from links WHERE ID = $argId";
47 $qs = "SELECT password from linksUsers WHERE userid = '$argUser'";
48 $qs = "SELECT userid FROM linksGroups where ID = $id";
49 $qs = "UPDATE links SET groupid = '$folder' WHERE $whereClause";
50 $qs = "UPDATE links SET groupid = NULL WHERE submitter = '$sessionUserId' AND groupid = $id";
51 $qs = "UPDATE linksGroups SET name = '$name' WHERE id = $id AND userid = '$sessionUserId'";
52 $qs = "UPDATE linksUsers SET email = '$email' WHERE userId = '$sessionUserId'";
53 $qs = "UPDATE linksUsers SET password = '$password' WHERE userId = '$sessionUserId'";
54 $qs2 = "SELECT * from linksGroups WHERE ID = $groupid";
55 $qs2 = "SELECT * from linksGroups WHERE ID = $groupid";
56 $qs2 = "SELECT count(*) FROM links WHERE groupid=$id";
57 $qs2 = "SELECT count(*) FROM links WHERE submitter='$sessionUserId' AND groupid is NULL";
58 $qs2 = "SELECT count(*) FROM links WHERE submitter='$sessionUserId'";
59 $qs2 = "SELECT count(*) FROM links WHERE submitter='$userId'";
60 $qs2 = "SELECT count(*) FROM links;";
61 $qs2 = "SELECT count(*) FROM linksGroups WHERE userid='$userId'";
62 $qs2 = "SELECT count(*) FROM linksUsers;";
63 $qs2 = "SELECT min(createDate) FROM links WHERE createDate > 0 AND submitter='$userId'";
Note: See TracBrowser for help on using the browser.