gcdb::esc_like()

最后更新于:2021-11-26 08:28:20

gcdb::esc_like( string$text)

First half of escaping for LIKE special characters % and _ before preparing for MySQL.

参数

$text

(string) (Required) The raw text to be escaped. The input typed by the user should have no extra or deleted slashes.

响应

(string) Text in the form of a LIKE phrase. The output is not SQL safe. Call gcdb::prepare() or gcdb::_real_escape() next.

源文件

文件: gc-includes/gc-db.php

	public function esc_like( $text ) {
		return addcslashes( $text, '_%\' );
	}