[Phpmyadmin-devel] $sql_query not initilized

Hi, i am not sure, but was/is there any reason why $sql_query is not always properly initilized? or is it just missing? i think it should happen in common.inc.php on line #429 with $GLOBALS['sql_query'] = ''; like it is done with $GLOBALS['db'] and $GLOBALS['table'] some lines above -- Sebastian Mendel www.sebastianmendel.de

Sebastian Mendel a écrit :
Hi,
i am not sure, but was/is there any reason why $sql_query is not always properly initilized? or is it just missing?
i think it should happen in common.inc.php on line #429 with $GLOBALS['sql_query'] = '';
like it is done with $GLOBALS['db'] and $GLOBALS['table'] some lines above
Sounds to me like it is missing indeed.

Marc Delisle schrieb:
Sebastian Mendel a écrit :
Hi,
i am not sure, but was/is there any reason why $sql_query is not always properly initilized? or is it just missing?
i think it should happen in common.inc.php on line #429 with $GLOBALS['sql_query'] = '';
like it is done with $GLOBALS['db'] and $GLOBALS['table'] some lines above
Sounds to me like it is missing indeed.
there are some "isset($sql_query)" that needs to be replaced by "! empty($sql_query)" -- Sebastian Mendel www.sebastianmendel.de

Marc Delisle wrote:
Sebastian Mendel a écrit :
Hi,
i am not sure, but was/is there any reason why $sql_query is not always properly initilized? or is it just missing?
i think it should happen in common.inc.php on line #429 with $GLOBALS['sql_query'] = '';
like it is done with $GLOBALS['db'] and $GLOBALS['table'] some lines above
Sounds to me like it is missing indeed.
common.lib.php revision 10231: 988... strlen($GLOBALS['sql_query']) && $GLOBALS['sql_query'] == 'TRUNCATE TABLE ' strlen is always >0 if $GLOBALS['sql_query'] == 'TRUNCATE TABLE ' so "strlen($GLOBALS['sql_query']) &&" is not needed here or did i overlook something? -- View this message in context: http://www.nabble.com/%24sql_query-not-initilized-tf3439288.html#a9766616 Sent from the phpmyadmin-devel mailing list archive at Nabble.com.

Jürgen Wind a écrit :
Marc Delisle wrote:
Sebastian Mendel a écrit :
Hi,
i am not sure, but was/is there any reason why $sql_query is not always properly initilized? or is it just missing?
i think it should happen in common.inc.php on line #429 with $GLOBALS['sql_query'] = '';
like it is done with $GLOBALS['db'] and $GLOBALS['table'] some lines above
Sounds to me like it is missing indeed.
common.lib.php revision 10231: 988... strlen($GLOBALS['sql_query']) && $GLOBALS['sql_query'] == 'TRUNCATE TABLE '
strlen is always >0 if $GLOBALS['sql_query'] == 'TRUNCATE TABLE ' so "strlen($GLOBALS['sql_query']) &&" is not needed here or did i overlook something?
Right, I'll remove it.

Jürgen Wind wrote:
Marc Delisle wrote:
Sebastian Mendel a écrit :
Hi,
i am not sure, but was/is there any reason why $sql_query is not always properly initilized? or is it just missing?
i think it should happen in common.inc.php on line #429 with $GLOBALS['sql_query'] = '';
like it is done with $GLOBALS['db'] and $GLOBALS['table'] some lines above
Sounds to me like it is missing indeed.
common.lib.php revision 10231: 988... strlen($GLOBALS['sql_query']) && $GLOBALS['sql_query'] == 'TRUNCATE TABLE '
strlen is always >0 if $GLOBALS['sql_query'] == 'TRUNCATE TABLE ' so "strlen($GLOBALS['sql_query']) &&" is not needed here or did i overlook something?
if i reorder the code if ( strlen($GLOBALS['table']) && isset($GLOBALS['sql_query']) && strlen($GLOBALS['sql_query']) && $GLOBALS['sql_query'] == 'TRUNCATE TABLE ' . PMA_backquote($GLOBALS['table']) ) { a opening "(" seems to be missing before "$GLOBALS['sql_query'] == 'TRUNCATE... " ??? -- View this message in context: http://www.nabble.com/%24sql_query-not-initilized-tf3439288.html#a9766814 Sent from the phpmyadmin-devel mailing list archive at Nabble.com.

Jürgen Wind a écrit :
Jürgen Wind wrote:
Marc Delisle wrote:
Sebastian Mendel a écrit :
Hi,
i am not sure, but was/is there any reason why $sql_query is not always properly initilized? or is it just missing?
i think it should happen in common.inc.php on line #429 with $GLOBALS['sql_query'] = '';
like it is done with $GLOBALS['db'] and $GLOBALS['table'] some lines above
Sounds to me like it is missing indeed.
common.lib.php revision 10231: 988... strlen($GLOBALS['sql_query']) && $GLOBALS['sql_query'] == 'TRUNCATE TABLE '
strlen is always >0 if $GLOBALS['sql_query'] == 'TRUNCATE TABLE ' so "strlen($GLOBALS['sql_query']) &&" is not needed here or did i overlook something?
if i reorder the code
if ( strlen($GLOBALS['table']) && isset($GLOBALS['sql_query']) && strlen($GLOBALS['sql_query']) && $GLOBALS['sql_query'] == 'TRUNCATE TABLE ' . PMA_backquote($GLOBALS['table']) ) {
a opening "(" seems to be missing before "$GLOBALS['sql_query'] == 'TRUNCATE... " ???
Nope. Maybe you are confusing the ending ")" of PMA_backquote. Note that strlen($GLOBALS['sql_query']) is no longer in trunk.
participants (3)
-
Jürgen Wind
-
Marc Delisle
-
Sebastian Mendel