We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33136
    • 3 Posts
    Hola friends,
    I go several days trying to learn on ModX.
    I believe that it is a very interesting product and with a lot of future.
    I am trying to do something like see in http://www.cerianipublicidad.com.ar/web/guia_pymes_avisos.php.
    But, I do not deal like to do it from ModX.

    It is a simple MySQL query  to 2 tables, grouped and paginated.

    Tables are:
    TABLE `rubros` (
      `Id_rubro` tinyint(3) unsigned NOT NULL auto_increment,
      `rubro` varchar(60) NOT NULL default ’’,
    PRIMARY KEY  (`Id_rubro`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1

    TABLE `empresas` (
      `cod_emp` int(11) NOT NULL auto_increment,
      `Id_rubro` tinyint(3) unsigned NOT NULL default ’0’,
      `empresa` varchar(80) NOT NULL default ’’,
      `domicilio` varchar(80) default NULL,
      `localidad` varchar(60) default NULL,
      `telefono` varchar(40) default NULL,
      `email` varchar(60) default NULL,
      `website` varchar(80) default NULL,
      `descripcion` text NOT NULL,
      `actualizado` date default NULL,
      PRIMARY KEY  (`cod_emp`),
      KEY `empresa` (`empresa`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1

    I did the following TV:
    Input Type: Text
    Default Value: @SELECT * from empresas,rubros WHERE rubros.Id_rubro=empresas.Id_rubro order by rubros.rubro,empresas.empresa
    Widget: DataGrid


    But I do not obtain a list arranged like in the URL of the sample.
    Can someone suggest something to me or orientate me like to solve it?

    Web Server:
    ----------------
    PHP Version 4.3.11
    MySQL version 4.1.10a
    Apache/1.3.33 (Unix) mod_ssl/2.8.24 OpenSSL/0.9.7a

    Forgive my bad English (I speak Spanish).

    Thank you!
    Yiyo