libraries/sqlparser.lib.php3: checkType function
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2003-01-21 Robin Johnson <robbat2@users.sourceforge.net>
|
||||||
|
* libraries/sqlparser.lib.php3: checkType function
|
||||||
|
|
||||||
2003-01-21 Alexander M. Turek <rabus@users.sourceforge.net>
|
2003-01-21 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* lang/catalan-*.inc.php3: Updates, thanks to Xavier Navarro (xavin).
|
* lang/catalan-*.inc.php3: Updates, thanks to Xavier Navarro (xavin).
|
||||||
|
|
||||||
|
@@ -594,6 +594,30 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
|
|||||||
return $sql_array;
|
return $sql_array;
|
||||||
} // end of the "PMA_SQP_parse()" function
|
} // end of the "PMA_SQP_parse()" function
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks for token types being what we want...
|
||||||
|
*
|
||||||
|
* @param string String of type that we have
|
||||||
|
* @param string String of type that we want
|
||||||
|
*
|
||||||
|
* @return boolean result of check
|
||||||
|
*
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
|
function PMA_SQP_typeCheck($toCheck, $whatWeWant)
|
||||||
|
{
|
||||||
|
$typeSeperator = '_';
|
||||||
|
if(strcmp($whatWeWant, $toCheck) == 0) {
|
||||||
|
return TRUE;
|
||||||
|
} else {
|
||||||
|
if(strpos($whatWeWant, $typeSeperator) === FALSE) {
|
||||||
|
return strncmp($whatWeWant, $toCheck , strpos($toCheck, $typeSeperator)) == 0;
|
||||||
|
} else {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Analyzes SQL queries
|
* Analyzes SQL queries
|
||||||
|
Reference in New Issue
Block a user