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


Recent Events
  • 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.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


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?

Links in tables
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Links in tables
#62837
Links in tables 6 Years, 8 Months ago Karma: 0
Hi
how can i insert a link in a table.
Exm:

Title Year Point Vote
Star wars 1978 10 (i want an icon here with a link to the movie)

i can make a table in the data base with movieid,icon,link
Thanks
The administrator has disabled public write access.
 
#62838
Re:Links in tables 6 Years, 8 Months ago Karma: 760
Hello,

Are links stored in a database or should they be generated dynamically based on title/year/other parameters?

Regards,
ARI Soft
The administrator has disabled public write access.
 
#62847
Re:Links in tables 6 Years, 8 Months ago Karma: 0
Hi.
I see that links are generated like this:
Movie: La vida futura
Link: www.sfcult.net/index.php/7-la-vida-futura
Movie: Viaje alucinante
Link: www.sfcult.net/index.php/5-viaje-alucinante

Where, the number is a field = movie_id, and then the title.

But , i can make a table with this links if its mandatory.
Thanks

By the way my code is :

SELECT
A.title AS Titulo,
A.duration AS Title,
YEAR(A.release_date) AS Year,
AVG(R.rating) AS Points
FROM jos_spmoviedb_movies A INNER JOIN jos_spmoviedb_reviews R
ON R.movieid = A.spmoviedb_movie_id
GROUP BY
A.title
ORDER BY
AVG(R.rating) DESC
Last Edit: 2018/03/27 08:22 By rastemserie.
The administrator has disabled public write access.
 
#62854
Re:Links in tables 6 Years, 8 Months ago Karma: 760
Use the following query:

Code:


SELECT
  A.title AS Titulo,
  A.duration AS Title,
  YEAR(A.release_date) AS Year,
  AVG(R.rating) AS Points,
  CONCAT(R.movieid, '-', REPLACE(LOWER(A.title), ' ', '-')) AS Link
FROM 
  jos_spmoviedb_movies A INNER JOIN jos_spmoviedb_reviews R
    ON R.movieid = A.spmoviedb_movie_id
GROUP BY 
  A.title
ORDER BY
  AVG(R.rating) DESC



Set "Columns settings -> ID" parameter to Link value and populate "Columns settings -> Format" parameter with the following value:

Code:


<a href="/index.php/{$value}">Link</a>



Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 1