[TYPO3-dev] include_once(PATH_site .'typo3conf/localconf.php');
Tapio Markula
tapio.markula at atwebteam.com
Wed Nov 29 10:16:15 CET 2006
Oliver Hader
>> include_once(PATH_site .'typo3conf/localconf.php');
>> and
>> file_get_contents(PATH_site .'typo3conf/localconf.php');
>>
>> but
>> $typo_db_username
>
> Are these special commands so special, that the TYPO3_DB object could
> not handle this problem? ;)
basic (very simple) SQL-commands for tables 'pages' and 'tt_content'.
UPDATE some field values, if certain conditions fulfill.
For security reasons, I'd suggest to have
> the parameters checked before pushing them to the DBMS.
>
> According to your problem:
> Have you tried $GLOBAL['typo_db_username']?
no - but I need also info
$dbConn=mysql_connect($dtypo_db_host,$typo_db_username,$typo_db_password);
> $GLOBAL['TYPO3_DB'] objects exists, the localconf.php must have been
> loaded before.
>
> $GLOBALS['TYPO3_DB'] has a 'link' variable: $GLOBALS['TYPO3_DB']->link
> You can use this for your special commands like this:
> $res = mysql_query($yourQueryString, $GLOBALS['TYPO3_DB']->link);
ok. I made at that way - worked. Thank's :).
I get rid of the ugly hack and I can even put this feature into as
public available.
This was a customer project. The customer wanted to add into alt_doc.php
'Publish' button for 'pages' and 'tt_content' records.
It sets hidden=1 to hidden=0 and starttime to current time, if starttime
is bigger than current time.
If 'pages' changes values in all record, which relate to the same page
in 'tt_content' table.
The problem was that I the place, where I need them, I can't debug
anything - debuggins simple didn't work at the needed context.
Thank's
More information about the TYPO3-dev
mailing list