Ciao a tutti.

Sto cercando di tradurre una query prevista e funzionante in access in MySQL:

codice:
	sql = "SELECT * FROM [tbl_login] WHERE"
    
    sql = sql & " ( [Nome] LIKE '%" & QueryWords( 0 ) & "%'"
	For i = LBound( QueryWords ) + 1 to UBound( QueryWords )
		If QueryWords( i ) <> "" and UCase( QueryWords(i) ) <> "OR" and UCase( QueryWords(i) ) <> "AND" Then
			If uCase( QueryWords( i-1 ) ) = "OR" Then
				sql = sql & " OR [Nome] LIKE '%" & QueryWords( i ) & "%'"
			Else
				sql = sql & " AND [Nome] LIKE '%" & QueryWords( i ) & "%'"
			End If
		End If
	Next
Risponde con:

Tipo di errore:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[MySQL][ODBC 3.51 Driver][mysqld-5.0.21-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[tbl_login] WHERE ( [Nome] LIKE '%ffff%' ) OR ( [Cognome] LIKE '%ffff%' ) OR ( [' at line 1
Qual'è la giusta sintassi ???