代码如下:$Conn = ObjCreate("ADODB.Connection")
$Conn.open ("DRIVER={MySQL ODBC 3.51 Driver};SERVER=" & $sServer & ";DATABASE=" & $sDatabase &";UID=" & $sUsername & ";PWD=" & $sPassword & ";PORT=3306;")
$RS = ObjCreate ( "ADODB.Recordset" )
$RS.ActiveConnection = $Conn
$RS.Open ("select count(id) from ticket where queue_id in (select id from queue where name like '优化%' or name like 'BUG%' or name like '咨询%');")
MsgBox(0,'',$RS.Fields(0).Value)
$RS.close
通过这种方法只能查出name like 'BUG%'的结果,其他两个条件没用,请问下,怎么让程序识别带有中文的查询条件呢? |