[TYPO3-project-formidable] A problem with datasource:DB

Ivan Gomez Rodriguez igomez at igalia.com
Thu Nov 15 14:34:23 CET 2007


We use revision 145. it seems a bug.

Thanks.

Jerome Schneider wrote:
> Hi Ivan,
> 
> ds_db should be able to handle group by statements in sql-queries since 
> revision 103; are you using up-to-date revision ? if yes, it should be a 
> bug of the ds_db object.
> 
> Excerpt from http://www.ameos.com/formidable/svn/full-changelog.html
> 
> -----------
> Revision: 103
> Author: jschneiderameos
> Date: 16:58:20, mardi 7 août 2007
> Message:
> ds_db/api/class.tx_dsdb.php:
>    -> now support GROUP BY statements in given sql query
> -------------
> 
> 
> Jerome Schneider
> 
> 
> 
> Ivan Gomez Rodriguez a écrit :
>> I'm trying to use a datasource like follows:
>>
>>                     <datasource:DB name="list_make_datasource">
>> 	                <sql><![CDATA[
>> 	                   SELECT
>>                             makes.make as make_name ,count(*) as num
>> 	                   FROM
>> 	                    tx_glcarauctionsystem_car cars
>> 	                    LEFT JOIN tx_glcarauctionsystem_static_make makes
>> 	                       ON cars.make = makes.uid 	
>>
>> 	                    GROUP BY makes.uid	
>> 	                  ]]>
>> 	                </sql>
>>                     </datasource:DB>
>>
>> but formidable core builds the following not well built query
>>
>> SELECT SQL_CALC_FOUND_ROWS makes.make as make_name ,count(*) as num
>> FROM tx_glcarauctionsystem_car cars
>>      LEFT JOIN tx_glcarauctionsystem_static_make makes
>>        ON cars.make = makes.uid
>> GROUP BY makes.uid
>> WHERE TRUE LIMIT 0, 3
>>
>> And WHERE must be placed before GROUP BY.
>>
>> I know the problem is in tx_dsdb:_getSql() but i don't know how solve it
>> :)
>>
>> Regards,
>>
>> Iván Gómez Rodríguez
>> Ingeniero en Informática
>> mailto:igomez at igalia.com
>>
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable
> 


More information about the TYPO3-project-formidable mailing list