[TYPO3-dev] I'd like to Implement perfectly the versioning fanction to my original extension.
François Suter
fsu-lists at cobweb.ch
Wed Jan 12 09:59:49 CET 2011
Hi Yuichiro,
> @:all
> I successed to get versions of a record of a table with
> extension-overlays( branches / WORKSPACE_SUPPORT ).
Cool :-)
I'm glad to have some feedback on this branch, as I expect to merge it
back to my extension's trunk soon.
> Next, I'd like to call data from two tables and get unique value.
And you still want proper overlays, right? This is where it gets very
tricky, because TYPO3 doesn't provide an API for that and my "overlays"
extension goes only so far. I can recommend the following:
> ex :
> " SELECT f1,f2 FROM table1 AS t1 INNER JOIN table2 AS t2 ON
> t1.f3=t2.f3 WHERE t1.f1='xxxx'; "
What I do in such cases (which you can see in use in extension
"checklists"; not public yet, but you can fetch the code there:
https://svn.typo3.org/TYPO3v4/Extensions/checklists/trunk/), is that I
query the 2 tables separately and join them in the PHP code.
Alternatively I have developed a whole suite of extensions called
"tesseract", you can read more here: http://www.typo3-tesseract.com/.
With the "dataquery" component you could execute the above query and get
properly overlaid and joined records (note with the workspace support
version of both overlays and dataquery, not the public version), but
this could not be used within your own extension. You would have to use
Tesseract's logic from beginning to end.
> and
> " SELECT DISTINCT f1 FROM table1;"
Again this cannot be achieved with a simple SQL query while taking
overlays into account. You would first need to get all the overlaid
records and then sort through them "manually" to get unique values.
HTH
--
Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
More information about the TYPO3-dev
mailing list