You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// AND updated IN (SELECT MAX(updated) FROM pages WHERE visible = 'y' GROUP BY slug)
58
59
// AND visible = 'y'
59
60
// ORDER BY updated DESC
60
61
61
62
varwcAuthor='%'+author+'%';
62
63
vara=author.trim().replace('-','%');
64
+
vargh=author.trim();
63
65
64
66
returndb.genericQuery(
65
-
"SELECT id AS pID, slug AS url, revision, title, published, updated, author, (SELECT COUNT(*) FROM pages WHERE slug = url AND visible = 'y') AS revisionCount, (SELECT COUNT(*) FROM tests WHERE pageID = pID) AS testCount FROM pages WHERE author LIKE ? OR author LIKE ? AND updated IN (SELECT MAX(updated) FROM pages WHERE visible = 'y' GROUP BY slug) AND visible = 'y' ORDER BY updated DESC",
66
-
[wcAuthor,a]
67
+
"SELECT id AS pID, slug AS url, revision, title, published, updated, author, authorGitHub, (SELECT COUNT(*) FROM pages WHERE slug = url AND visible = 'y') AS revisionCount, (SELECT COUNT(*) FROM tests WHERE pageID = pID) AS testCount FROM pages WHERE (author LIKE ? OR author LIKE ? OR authorGitHub = ?) AND updated IN (SELECT MAX(updated) FROM pages WHERE visible = 'y' GROUP BY slug) AND visible = 'y' ORDER BY updated DESC",
'SELECT published, updated, author, authorEmail, revision, visible, title FROM pages WHERE slug = ? AND visible = ? ORDER BY published ASC',
133
+
'SELECT published, updated, author, authorGitHub, authorEmail, revision, visible, title FROM pages WHERE slug = ? AND visible = ? ORDER BY published ASC',
0 commit comments