请问这两段数据库查询代码有什么区别?请指导一下,谢谢
strSQL = strSQL & "WHERE Title LIKE '%" & sarySearchWord(0) & "%'"
For intSQLLoopCounter = 0 To UBound(sarySearchWord)
strSQL = strSQL & " OR Title LIKE '%" & sarySearchWord(intSQLLoopCounter) & "%'"
strSQL = strSQL & " OR Keywords LIKE '%" & sarySearchWord(intSQLLoopCounter) & "%'"
strSQL = strSQL & " OR Description LIKE '%" & sarySearchWord(intSQLLoopCounter) & "%'"
Next
------
strSQL = strSQL & "WHERE (Title LIKE '%" & sarySearchWord(0) & "%'"
For intSQLLoopCounter = 1 To UBound(sarySearchWord)
strSQL = strSQL & " AND Title LIKE '%" & sarySearchWord(intSQLLoopCounter) & "%'"
Next
strSQL = strSQL & ") OR (Keywords LIKE '%" & sarySearchWord(0) & "%'"
For intSQLLoopCounter = 1 To UBound(sarySearchWord)
strSQL = strSQL & " AND Keywords LIKE '%" & sarySearchWord(intSQLLoopCounter) & "%'"
Next
strSQL = strSQL & ") OR (Description LIKE '%" & sarySearchWord(0) & "%'"
For intSQLLoopCounter = 1 To UBound(sarySearchWord)
strSQL = strSQL & " AND Description LIKE '%" & sarySearchWord(intSQLLoopCounter) & "%'"
Next