Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Link article K2 with INNER JOIN
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Link article K2 with INNER JOIN
#44368
Link article K2 with INNER JOIN 11 Years, 2 Months ago Karma: 0
I would need to create a report from tables of K2. The data is extracted from three tables with INNER JOIN:

SELECT
jom_k2_items.title, jom_k2_users.userName,
jom_k2_categories.name,
FROM jom_k2_items
INNER JOIN jom_k2_users ON jom_k2_users.userID = jom_k2_items.created_by
INNER JOIN jom_k2_categories ON jom_k2_items.catid = jom_k2_categories.id

The result is correct and satisfies me as shown in the "immagine1". But How do I put the link to the post title?
Thank you for the assistance that you will give me.

Best regards
The administrator has disabled public write access.
 
#44396
Re:Link article K2 with INNER JOIN 11 Years, 2 Months ago Karma: 760
Hello,

Use the following SQL query:

Code:


SELECT
  I.id,
  I.title, 
  U.userName,
  C.name
FROM 
  #__k2_items I INNER JOIN #__k2_users U 
    ON U.userID = I.created_by
  INNER JOIN #__k2_categories C 
    ON I.catid = C.id



Set "Columns settings -> ID" parameter to id and set "Columns settings -> Hidden" parameter to "Yes" in module settings. Set also "Columns settings -> ID" parameter to title and "Columns settings -> Format" parameter to the following value:

<a href="index.php?option=com_k2&view=item&id={$columns:id}">{$value}</a>

Regards,
ARI Soft
The administrator has disabled public write access.
 
#44397
Re:Link article K2 with INNER JOIN 11 Years, 2 Months ago Karma: 0
thank you very much for your quick response and your professionalism.
the solution works properly.
best regards
The administrator has disabled public write access.
 
Go to topPage: 1