Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Member Pink Spider's Avatar
    Join Date
    Nov 2011
    Location
    Wimbledon, London
    Posts
    58
    Member #
    30014
    Liked
    2 times
    I'm building a website in Joomla and have no experience of SQL but need to put in an SQL query.

    I've extended this joomla website with a CCK (Seblod) and I'm trying to create a field in this CCK which is basically a dynamic dropdown box that lists all child categories in my website so that the administrator can create an article and choose which category to put it into easily.

    I've tried posting on the Seblod forum but have no answer yet and really need to get going on this. Their documentation isn't too clear (to me!) either.

    Here is the link where the documentation explaining the dynamic field is http://www.seblod.com/support/docume...t-dynamic.html

    It says:

    Manual creation of the SQL query to automatically fill field options ("text" and "value"). Syntax of the SQL query must be like:

    Field_name_1 AS SELECT text, field_name_2 AS value FROM #__table

    (replace Field_name_1 and field_name_2 by your own fields, and #__table
    by your datatable name). Add any SQL words like WHERE, LIMIT ...
    Example: list all links from a Joomla menu

    SELECT title AS text, link AS value FROM [# __menu] WHERE menutype = 'mainmenu'

    The field will be formed by the list of "Mainmenu" menu links.

    I don't understand how to construct the query so if anyone could help I would be very grateful.

    Thank you
    Arun@m6 likes this.

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Hopefully it's as simple as this:

    Code:
    SELECT title AS text, id AS value FROM jos_categories ORDER BY title ASC

  4. #3
    Junior Member Arun@m6's Avatar
    Join Date
    May 2013
    Location
    India
    Posts
    7
    Member #
    36402
    Quote Originally Posted by Pink Spider, post: 237537, member: 30043
    I'm building a website in Joomla and have no experience of SQL but need to put in an SQL query.

    I've extended this joomla website with a CCK (Seblod) and I'm trying to create a field in this CCK which is basically a dynamic dropdown box that lists all child categories in my website so that the administrator can create an article and choose which category to put it into easily.

    I've tried posting on the Seblod forum but have no answer yet and really need to get going on this. Their documentation isn't too clear (to me!) either.

    Here is the link where the documentation explaining the dynamic field is http://www.seblod.com/support/docume...t-dynamic.html

    It says:

    Manual creation of the SQL query to automatically fill field options ("text" and "value"). Syntax of the SQL query must be like:

    Field_name_1 AS SELECT text, field_name_2 AS value FROM #__table

    (replace Field_name_1 and field_name_2 by your own fields, and #__table
    by your datatable name). Add any SQL words like WHERE, LIMIT ...
    Example: list all links from a Joomla menu

    SELECT title AS text, link AS value FROM [# __menu] WHERE menutype = 'mainmenu'

    The field will be formed by the list of "Mainmenu" menu links.

    I don't understand how to construct the query so if anyone could help I would be very grateful.

    Thank you
    I think you should be writing the query as
    Code:
    SELECT category AS text, id as value FROM [Category_table]
    Hope you are able to solve it. If you can give your table schema, I can help you out better.

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    Why would anyone give a complete stranger a database schema, especially someone who asks with their first post? Are you out of your friggin' mind?
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

seblod sql query

Click on a term to search for related topics.
All times are GMT -6. The time now is 10:25 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com