We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25551 ☆ A M B ☆
    • 1,231 Posts
    Can someone tell me where I can find a full tutorial on how to create a search of custom tables? There is no full explanation of config files etc on how to use the feature for non rocket scientists.

    This page has what I want to do http://www.modx.wangba.fr/index.php?id=376 but there’s no info on how to achieve it and the wiki isn’t helping either.

    Thanks!

    The error I get is AjaxSearch error: table modx_test not defined in the configuration file: !

    I created a table called modx_test and put some values etc in. I just dono what on earth to do to get the custom table search working.

    my dedicated server uses mySQL 5.0.87

    I tried several snippet calls
    [!AjaxSearch? &ajaxSearch=`1` &jscript=`mootools1.2` &opacity=`0.6` &liveSearch=`1` &AS_landing=`376` &config=`test` &whereSearch=`modx_test` !]

    [!AjaxSearch? &ajaxSearch=`1` &jscript=`mootools1.2` &opacity=`0.6` &liveSearch=`1` &AS_landing=`376` &whereSearch=`modx_test` !]

    [!AjaxSearch? &ajaxSearch=`1` &jscript=`mootools1.2` &opacity=`0.6` &liveSearch=`1` &AS_landing=`376` &config=`test` &whereSearch=`[|modx_test[:title:about]]` !]



      Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
      AugmentBLU - MODX Partner

      BLUcart - MODX Revolution E-Commerce & Shopping Cart
      • 5811
      • 1,717 Posts
      As a search in custom tables isn’t really easy to implement, I have intentionaly limited the documentation. Just to be not snowed under questions and requests smiley If you are really interested, I could quote and implement your request. Send by PM, your table structure (mysql export) and what you want search & filter.
        • 25551 ☆ A M B ☆
        • 1,231 Posts
        Hello, there’s no option to PM you?
          Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
          AugmentBLU - MODX Partner

          BLUcart - MODX Revolution E-Commerce & Shopping Cart
          • 25551 ☆ A M B ☆
          • 1,231 Posts
          I’m still looking to have a custom search but there is still no option to PM you. Does anyone else know how to get this working?

          Thanks!
            Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
            AugmentBLU - MODX Partner

            BLUcart - MODX Revolution E-Commerce & Shopping Cart
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            there is still no option to PM you
            Go to "My Messages" in the top menu bar, then click on New Message in the menu to the left, then click the "Find Members" icon to the right of the "To" field.

            Or click on his name to get his profile page, and click on the "Send this member a personal message" link near the bottom of the page.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 15557
              • 6 Posts
              Hello

              I have a similiar problem. I need search users from table "modx_web_users" ’username’. im trying like in first post here, but its not work. I have error :
              "AjaxSearch error: table modx_web_users not defined in the configuration file: !"

              i dont knew what to do sad

              any help?
                • 20958
                • 2 Posts
                I’m studying AS code and want to make it clear for myself..

                If I want to enable search in content and TV tables, as well in my custom table, then I must join my table, i.e. fill out $this->joined variable of the Search class, as defined in search.class.inc.php?

                I don’t want to PM anyone just now, so I’ll post my table structure here if it helps:

                CREATE TABLE IF NOT EXISTS `department` (
                  `department_id` int(11)  NOT NULL AUTO_INCREMENT,
                  `name` varchar(75) NOT NULL DEFAULT '',
                  `phone` varchar(50) DEFAULT NULL,
                  `fax` varchar(50) DEFAULT NULL,
                  `location` varchar(50) DEFAULT NULL,
                  `classes` text,
                  `staff` varchar(50) DEFAULT NULL,
                  `head` int(11) NOT NULL DEFAULT '0',
                  `science` text,
                  `other` text,
                  `link` varchar(150) NOT NULL DEFAULT '',
                  PRIMARY KEY (`department_id`)
                )  ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Contains department data.' AUTO_INCREMENT=1;


                name, classes, staff, science and other are searchable fields.

                Thx in advance.