Where clause (Less than) not working

More
8 years 5 months ago #3607 by jcolls
Where clause (Less than) not working was created by jcolls
Hi there,

Firsatly, great extension. I'm trialling it at the moment but thing we will be purchasing a Pro license if all goes well.

Have a bit of trouble with the SQL-WHERE Expression set on the menu item options.

If I enter Release_Date > NOW()
Everything works as expected and the test entries with a datetime greater than now are displayed.

However, if I enter Release_Date < NOW()
Then when I press save on the menu item the statement is edited to just Release_Date.
It strips off the less than and Now().
I have changed my editor settings to not strip any tags etc but no luck.

Is this a bug or am I doing something wrong (probably).

Thanks

Please Log in to join the conversation.

More
8 years 5 months ago - 8 years 5 months ago #3608 by Dirk
Replied by Dirk on topic Where clause (Less than) not working
The Problem is caused by the > sign because the input is filtered!

Add a filter="raw" to /components/com_joodb/views/catalog/tmpl/default.xml for the where_statement
<field name="where_statement" type="textarea" default="" rows="5" cols="30" filter="raw" label="SQL-WHERE Statement" description="SQL-WHERE Statement description" />

Will be fixed with the next Version!
Last edit: 8 years 5 months ago by Dirk.
The following user(s) said Thank You: jcolls

Please Log in to join the conversation.

More
8 years 5 months ago #3609 by jcolls
Replied by jcolls on topic Where clause (Less than) not working
Wow, thanks for a super quick reply and solution.

Many thanks.

Please Log in to join the conversation.

More
7 years 9 months ago #3892 by Zaskar
Replied by Zaskar on topic Where clause (Less than) not working
Hello,

I have the same Problem! When I enter text in the "SQL-WHERE Expression" field that contains the string "<" the text will be cut off beginning at the Position with the "<" sign! So when I enter "number < 100" only the text "number" is being stored. The rest is missing.

And I also checked if the file Default.xml contains the entry:

"<field name="where_statement" type="textarea" default="" rows="5" cols="30" filter="raw" label="SQL-WHERE Statement" description="SQL-WHERE Statement description" />"

This is the case but it is not possible to create the where clause containing the less than ("<") Expression.

Regards,
Zaskar

Please Log in to join the conversation.

More
7 years 9 months ago #3893 by Dirk
Replied by Dirk on topic Where clause (Less than) not working
Check again ... should work!

Please Log in to join the conversation.

More
7 years 9 months ago #3894 by Zaskar
Replied by Zaskar on topic Where clause (Less than) not working
Hi Dirk,

thank you for your answer but I tested it several times and it is not working! I added three screenshots to my answer. The first one is the data that I would like to enter in the field. The second one is showing the result after saving it. And the third one is a Screenshot of the Default.xml file showing that the entry you mentioned here in this thread is already there.

I have installed the free Version of JooDb 3.0.4 on PHP 5.5.35 with Joomla 3.4.8.

This message has attachments images.
Please log in or register to see it.

Please Log in to join the conversation.

Moderators: Dirkjoest