|
1
|
1
|
new file mode 100644
|
|
...
|
...
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+<?php
|
|
|
2
|
+
|
|
|
3
|
+// Default query strings used throughout the script. You may need to alter these to bridge to other scripts or databases.
|
|
|
4
|
+
|
|
|
5
|
+define ("_AUTHORPREFIX", defined("TABLEPREFIX") ? TABLEPREFIX : $tableprefix);
|
|
|
6
|
+
|
|
|
7
|
+define ("_UIDFIELD", "author.uid"); // Do not change the aliasing (the "author." part)!
|
|
|
8
|
+define ("_PENNAMEFIELD", "author.penname"); // Do not change the aliasing (the "author." part)!
|
|
|
9
|
+define ("_EMAILFIELD", "author.email"); // Do not change the aliasing (the "author." part)!
|
|
|
10
|
+define ("_PASSWORDFIELD", "author.password"); // Do not change the aliasing (the "author." part)!
|
|
|
11
|
+define ("_AUTHORTABLE", _AUTHORPREFIX."fanfiction_authors as author"); // Do not change the aliasing (the "as author" part)!
|
|
|
12
|
+
|
|
|
13
|
+define ("_STORYQUERY", "SELECT stories.*, "._PENNAMEFIELD." as penname, UNIX_TIMESTAMP(stories.date) as date, UNIX_TIMESTAMP(stories.updated) as updated FROM ("._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_stories as stories) WHERE "._UIDFIELD." = stories.uid AND stories.validated > 0 ");
|
|
|
14
|
+define ("_STORYCOUNT", "SELECT count(sid) FROM ".TABLEPREFIX."fanfiction_stories as stories WHERE validated > 0");
|
|
|
15
|
+define ("_SERIESQUERY", "SELECT series.*, "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_series as series WHERE "._UIDFIELD." = series.uid ");
|
|
|
16
|
+define ("_SERIESCOUNT", "SELECT COUNT(seriesid) FROM ".TABLEPREFIX."fanfiction_series as series ");
|
|
|
17
|
+define ("_MEMBERLIST", "SELECT "._PENNAMEFIELD." as penname, "._UIDFIELD." as uid, ap.stories FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs AS ap ON "._UIDFIELD." = ap.uid");
|
|
|
18
|
+define ("_MEMBERCOUNT", "SELECT COUNT("._UIDFIELD.") FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs AS ap ON ap.uid = "._UIDFIELD);
|
|
|
19
|
+?>
|
|
0
|
20
|
\ No newline at end of file
|