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

Sebastian Mendel lists at sebastianmendel.de
Mon Nov 28 08:26:04 CET 2005

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?

Sebastian Mendel

www.sf.net/projects/phpdatetime | www.sf.net/projects/phptimesheet

More information about the Developers mailing list