用sprintf实现sql参数绑定

$format = "SELECT data FROM sessions WHERE sid = '%s' LIMIT 1";
$this->tosql = sprintf($format, $sid);

你可能感兴趣的:(基础知识)