wordpress/wp-content/plugins/sqlite-integration/functions.php
/**
	 * Method to emulate MySQL LOG() function.
	 *
	 * Used with one argument, it returns the natural logarithm of X.
	 * <code>
	 * LOG(X)
	 * </code>
	 * Used with two arguments, it returns the natural logarithm of X base B.
	 * <code>
	 * LOG(B, X)
	 * </code>
	 * In this case, it returns the value of log(X) / log(B).
	 *
	 * Used without an argument, it returns false. This returned value will be
	 * rewritten to 0, because SQLite doesn't understand true/false value.
	 *
	 * @param integer representing the base of the logarithm, which is optional.
	 * @param double value to turn into logarithm.
	 * @return double | NULL
	 */
Method to emulate MySQL LOG() function.
Used with one argument, it returns the natural logarithm of X.

LOG(X)

Used with two arguments, it returns the natural logarithm of X base B.

Used without an argument, it returns false. This returned value will be
rewritten to 0, because SQLite doesn't understand true/false value.

@param integer representing the base of the logarithm, which is optional.
@param double value to turn into logarithm.
@return double | NULL
Method to emulate MySQL LOG () function . Used with one argument it returns the natural logarithm of X . LOG ( X ) Used with two arguments it returns the natural logarithm of X base B . Used without an argument it returns false . This returned value will be rewritten to 0 because SQLite doesn ' t understand true / false value . @param integer representing the base of the logarithm which is optional . @param double value to turn into logarithm . @return double | NULL
public function log() {
		$numArgs = func_num_args();
		if ($numArgs == 1) {
			$arg1 = func_get_arg(0);
			return log($arg1);
		} else if ($numArgs == 2) {
			$arg1 = func_get_arg(0);
			$arg2 = func_get_arg(1);
			return log($arg1)/log($arg2);
		} else {
			return null;
		}
	}
public function log ( ) { $ numArgs = func_num_args ( ) ; if ( $ numArgs == 1 ) { $ arg1 = func_get_arg ( 0 ) ; return log ( $ arg1 ) ; } else if ( $ numArgs == 2 ) { $ arg1 = func_get_arg ( 0 ) ; $ arg2 = func_get_arg ( 1 ) ; return log ( $ arg1 ) / log ( $ arg2 ) ; } else { return null ; } }
Method to emulate MySQL LOG() function.
Method to emulate MySQL LOG () function .