Special Field - SQL

Category: Community Surveys 9 months ago

Hi ;

I am very excited to see a new special question type call SQL.

I know how to use the following except Conditions

Table Name*:
Label Column*:
Value Column*:
Conditions*:

Is there any documentation online for this question type , how do i use the conditions type is it in mysql query format ?

Thank you for all the awesome addin

Is it possible for future release to make the dropdown searchable , like when the user type a keyword it will auto select anything which matach. This is good for dropdown of a long list which exceed 50 or more data row

Like it on Facebook, Tweet it or share this topic on other bookmarking websites.
  • Re: Special Field - SQL

    by » 9 months ago


    I did not create the documentation yet, sorry about that. Will add it soon. Please find below the required info.

    Conditions: This is documented on the icon beside the label. Posting verbatim copy here:

    Enter comma seperated list of conditions. Supports the following operators: (eq),(ne),(lt),(gt),(le),(ge),(like). All conditions are gluid with AND operator. Eg. column1(eq)2,column2(eq)test,column3(ne)100,column4(ge)20,column5(like)test

    You can build "where" condition of the sql command using this option. the conditions are like this.

    • column1(eq)2 - this will produce "where column1 = 2"
    • column1(ne)2 - this will produce "where column1 != 2"
    • column1(lt)2 - this will produce "where column1 < 2"
    • column1(gt)2 - this will produce "where column1 > 2"
    • column1(le)2 - this will produce "where column1 <= 2"
    • column1(ge)2 - this will produce "where column1 >= 2"
    • column1(like)2 - this will produce "where column1 like '%2%' "

    You can combine multiple conditions with comma separated conditions. All are added up with AND, ex:

    column1(e1)2,column2(gt)3 will produce "where column1 = 2 AND column2 > 3"


    Follow me on twitter: https://twitter.com/corejoomla
    If you use our extensions, please post a rating and a review at the Joomla! Extensions Directory.
    Sociable | Surveys | 
    CjForum | Polls | Answers | Quizzes | Quotes | GPS ToolsCjFit | CjBlog


  • Re: Special Field - SQL

    by » 9 months ago


    Thank you for your quick reply it is so interesting.

    Can the condition be based on one of the survey field like if i have the employee number at the start of the survey form.

    Can the condition include the survery field employee number , so i have like where sapno=employee number

    Thank you , it will be so awesome if this is possible


  • Re: Special Field - SQL

    by » 9 months ago


    You can fetch a field from any one table but joining with another table is not possible at this time.

    Follow me on twitter: https://twitter.com/corejoomla
    If you use our extensions, please post a rating and a review at the Joomla! Extensions Directory.
    Sociable | Surveys | 
    CjForum | Polls | Answers | Quizzes | Quotes | GPS ToolsCjFit | CjBlog


  • Re: Special Field - SQL

    by » 9 months ago


    What i mean is that can the sql query be base on the user input in the survey form itself ?


  • Re: Special Field - SQL

    by » 9 months ago


    I would suggest conditional rules which do exactly the same thing.

    Querying another table based on the current user id is not possible as the question does not have any such facility to read the user id as input.


    Follow me on twitter: https://twitter.com/corejoomla
    If you use our extensions, please post a rating and a review at the Joomla! Extensions Directory.
    Sociable | Surveys | 
    CjForum | Polls | Answers | Quizzes | Quotes | GPS ToolsCjFit | CjBlog


You do not have permissions to reply to this topic.

Powered by CjForum

Trending Topics

Editing your questions and answers
  • 2 replies
Good day! Probably need to limit the time of correcting questions...

View all responses in Consolidated Report
  • 8 replies
Hi, I'm hoping to use Community Surveys Pro to collect...

The user answers himself
  • 2 replies
Good day! The user asked a question, he can answer himself and earn...

Letter mismatch
  • 5 replies
Good day! The letters of the name and icon do not match. In this...

Language Constant COM_COMMUNITYPOLLS_POLL_VIEW_DEFAULT_OPTION missing
  • 1 reply
Hello corejoomla Team, it seems that Community Polls is missing the...