No Where Clause in SQL?

Free responsive Joomla 2.5 and 3.x module to present your content with easy and intuitive way.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Sat Oct 12, 2013 6:25 pm
Hello all. I'm new to this forum and new to GK Pro, so thanks for helping a noob. I've researched online to try and find a solution, but I cannot.

I'm setting up a News Show Pro GK4 Module and am getting a SQL error. I can tell that the error is caused because there is no 'where' clause, and the SQL statement is failing:

Code: Select all
SQL=SELECT CONTENT.ID AS ID, CATS.NAME AS CAT_NAME, CATS.ALIAS AS CAT_ALIAS, CONTENT.CATID AS CAT_ID, USERS.NAME AS AUTHOR, USERS.EMAIL AS AUTHOR_EMAIL, USERS.ID AS AUTHOR_ID, CONTENT_RATING.RATING_SUM AS RATING_SUM, CONTENT_RATING.RATING_COUNT AS RATING_COUNT    FROM PARK_K2_ITEMS AS CONTENT LEFT JOIN PARK_K2_CATEGORIES AS CATS ON CATS.ID = CONTENT.CATID LEFT JOIN PARK_USERS AS USERS ON USERS.ID = CONTENT.CREATED_BY LEFT JOIN PARK_K2_RATING AS CONTENT_RATING ON CONTENT.ID = CONTENT_RATING.ITEMID WHERE ORDER BY RAND()


The offending part being: "WHERE ORDER BY RAND()".

In the datasource options section, I am selecting items from a K2 Category and clearly have it selected.

Can anyone help decipher the problem?
User avatar
Fresh Boarder

GK User
Sun Oct 13, 2013 12:38 pm
What type of data source do you use? K2 or Joomla! items? Probably something is wrong with configuration and that's why the query have no additional WHERE rules.
User avatar
Platinum Boarder

GK User
Wed Oct 16, 2013 5:31 am
The data source is K2 Categories and I have a category selected. I've uploaded a screenshot of the data source configuration, hopefully you can see it.
User avatar
Fresh Boarder

GK User
Wed Oct 16, 2013 10:05 am
There is no attachment in your latest response, could you upload file again?
User avatar
Platinum Boarder

GK User
Wed Oct 16, 2013 2:29 pm
User avatar
Fresh Boarder

GK User
Thu Oct 17, 2013 9:49 am
Could you test it with News Show Pro GK5? If the problem will be also with this module please provide me access via PM.
User avatar
Platinum Boarder


cron