[TYPO3-dev] Update database when saving plugin flexform configuration in BE?
David Bruchmann
typo3-dev at bruchmann-web.de
Thu Sep 10 11:21:59 CEST 2009
Von: JoH asenau <info at cybercraft.de>
Gesendet: Donnerstag, 10. September 2009 10:57:40
>> Referring the Argument of time you're right but the queries can be
>> build with sql_fetch_row instead of sql_fetch_assoc or $row =
>> $this->sql_fetch_assoc should work too for 1-row results without loop.
>
> This is what I would do, but Dmitry would prefer a single function call to
> keep the code readable and this is why I proposed to introduce
> exec_SELECTgetSingleRow(), which would take care of memory leaks as well.
>
Hi Jo,
Dimitry proposed: "Also there is no need for the loop: you have only one
row, which you could access as with a single call to sql_fetch_assoc()."
that's the same like I proposed.
Concerning readability the base-funtions they are very easy to read,
difficult are the parameters only or the $content of loops.
Furthermore I like to write my query like this:
sql_doSomething(
'SELECT' => mySuperLongFunctionCall(ThousandParameters),
'WHERE' => '...',
...
);
instead of mergin all into one line.
"mySuperLongFunctionCall(ThousandParameters)" can be broken into several
lines too.
I think changing the kind of writing often brings more for readability
as changing the functions.
Best Regards
David
More information about the TYPO3-dev
mailing list