Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Get post name for latest comments display

givanz52c212154519
diff --git a/admin/sql/mysqli/comment.sql b/admin/sql/mysqli/comment.sql
index ece5e40..e3f3b71 100755
--- a/admin/sql/mysqli/comment.sql
+++ b/admin/sql/mysqli/comment.sql
@@ -24,6 +24,11 @@
BEGIN
SELECT user.*, comment.*, comment_id as array_key
+ @IF isset(:post_title) AND :post_title
+ THEN
+ ,post_content.name
+ END @IF
+
FROM comment AS comment
LEFT JOIN user ON (comment.user_id = comment.user_id)
diff --git a/admin/sql/pgsql/comment.sql b/admin/sql/pgsql/comment.sql
index e5a6b76..f1c5f35 100755
--- a/admin/sql/pgsql/comment.sql
+++ b/admin/sql/pgsql/comment.sql
@@ -24,6 +24,11 @@
BEGIN
SELECT "user".*, comment.*, comment_id as array_key
+ @IF isset(:post_title) AND :post_title
+ THEN
+ ,post_content.name
+ END @IF
+
FROM comment AS comment
LEFT JOIN "user" ON (comment.user_id = comment.user_id)
diff --git a/admin/sql/sqlite/comment.sql b/admin/sql/sqlite/comment.sql
index 814c217..116eb13 100755
--- a/admin/sql/sqlite/comment.sql
+++ b/admin/sql/sqlite/comment.sql
@@ -24,6 +24,11 @@
BEGIN
SELECT user.*, comment.*, comment_id as array_key
+ @IF isset(:post_title) AND :post_title
+ THEN
+ ,post_content.name
+ END @IF
+
FROM comment AS comment
LEFT JOIN user ON (comment.user_id = comment.user_id)