[TYPO3-project-formidable] renderlet:LISTER in Searchform / Display of total number of records / Access to SQL-Query

Jerome Schneider typo3dev at ameos.com
Mon Mar 9 10:51:12 CET 2009


For your point#2,

You may try the following:
$aData = $this->aORenderlets["mysearchform"]->_fetchData(
	array(
		"page" => 0,
		"perpage" => 100000000,
		"sortcolumn" => "city",
		"sortdirection" => "ASC",
	)
);


Or, to get only the generated SQL query:
$sSql = $this->aODatasources["mydatasource"]->_getSql(
	array(
		"page" => 0,
		"perpage" => 100000000,
		"sortcolumn" => "city",
		"sortdirection" => "ASC",
	),
	$this->aORenderlets["mysearchform"]->_getFilters()
);


Hope this helps !
Note: these methods have not been designed to be used directly within 
your application, and that's the reason why you have to provide such 
bizarre array of params. If you feel that this is something we should 
make more accessible, I will hear your suggestions :)

Regards,
Jerome Schneider

Leopold Mayr a écrit :
> Hi List,
> 
> ...I hope this ain't a dumb question...
> 
> I have a searchform with a lister that displays 50 records at a time 
> (with pager).
> 
> I have the following two problems:
> 
> 1. I want to display the total number of records that match the search 
> critera and I can't find any info on that, maybe I've been looking in 
> all the wrong places...
> 
> 2. In each row of the lister I have included a checkbox with 
> activelistable=true and a "Save all" button that saves the uids of 
> checked records in a session array (a "remember" list). I have also 
> written a Javascript function that checks all checkboxes. All this works 
> fine, but it only works for the records that are displayed. I want to 
> include a "Save all" Button that saves all uids of records that match 
> the search criteria. Is there a way to access the SQL-query generated by 
> the searchform so that I can extract a list of uids maually? I could 
> then also use this Query to get the total number of records in order to 
> solve problem #1. Or is there an array that contains all records?
> 
> I'd appreciate any help, because I'm really stuck here
> 
> Thanks in advance,
> 
> Leo
> 
> 


More information about the TYPO3-project-formidable mailing list