I am using a lib which uses
$pattern = "LIMIT[^w]{1,}([0-9]{1,})([,]{0,})([0-9]{0,})";
$replacement = "";
eregi($pattern, $query, $regs);
$query = eregi_replace($pattern, $replacement, $query);
if($regs[2])
$query = str_ireplace("SELECT ", "SELECT TOP ".$regs[3]." ", $query);
else
{
if($regs[1])
$query = str_ireplace("SELECT ", "SELECT TOP ".$regs[1]." ", $query);
}
I change some part of the code to
$pattern = "/LIMIT[^w]{1,}([0-9]{1,})([,]{0,})([0-9]{0,})/i";
$replacement = "";
preg_match($pattern, $query, $regs);
但现在我用错误信息说,“未明确抵消:2”和“未界定的抵销” 1)
我认为,从效忠到先验,应该容易......。