[TYPO3-core] RFC: fix dependency on PHP 4.3 in t3lib_db

Holzinger Franz franz at fholzinger.com
Mon Jan 2 23:15:15 CET 2006


Hello,

>Michael Stucki <michael at typo3.org> writes on 
>Mon, 02 Jan 2006 15:22:58 +0100 (MET):
>
>  
>
>>Hi Martin,
>>
>>
>>    
>>
>>>>Problem: While mysql_real_escape_string is the best way to escape
>>>>DB values it's only available since PHP 4.3 and it needs a valid
>>>>link identifier.
>>>>        
>>>>
>>No, it doesn't need the link identifier. It is optional, and if it is
>>not specified, PHP will use the last link openend by mysql_connect
>>(see http://ch.php.net/mysql_real_escape_string).
>>    
>>
>
>
>Yes, but if we *know* we have no connection it makes no sense to call it without one as we certainly do not want an auto-connect.
>
>Anyway, I'll remove the check as suggested.
>
>  
>
But I think the link can be useful if someone wants to write an
extension which uses its own database connection apart from the TYPO3
libraries.

>Could not connect select Mysql database
>
--> Could not select Mysql database


Regards,

Franz






More information about the TYPO3-team-core mailing list