[Phpmyadmin-devel] whats on with $rs in common.lib.php?

Marc Delisle Marc.Delisle at cegepsherbrooke.qc.ca
Mon Nov 28 09:04:06 CET 2005


Sebastian Mendel a écrit :
> Sebastian Mendel schrieb:
> 
>> Garvin Hicking wrote:
>>
>>> Hi Sebastian!
>>>
>>>> can some pls check for $rs and make the code a little bit more clear 
>>>> about this
>>>> variable?
>>>
>>>
>>> $rs holds the variable reference to the Database connection handler 
>>> (=ressource)
>>> of the executed query statement.
>>>
>>>> i have given up trying to fully understand whats going with this 
>>>> variable ...
>>>
>>>
>>> What exactly are you trying to understand? Maybe we can give you a 
>>> better clue
>>> then?
>>
>>
>>  - the name could be more descriptive
>>  - its only set inside an if statement but used always, so this could 
>> lead to unset variable notice
>>  - its send to the function even if empty
>>
>> at least: can it be unset at the end?
>>
>>
>> this all makes it hard to 'read' the code
>>
>> im talking mainly about the code on lines 1498 to 1547
> 
> 
> $rs is a mysql result resource, but its allways freed with free result!
> 
> but also given to function PMA_safe_db_list(), why? what is the sense 
> behind this?
> 
> 
> 

I am studying the code now...

Marc




More information about the Developers mailing list