Ciao guys,
ho scritto una sintassi per la ricerca di codici e di parole all'interno di 2 tabella di un db mysql: l'utente tramite un form invia il valore da selezionare e scegli la tabella sulla quale eseguire la ricerca:

codice:
		SelDe1=Cstr(Request.Form("selector"))
				SelDe2=replace(replace(trim(SelDe1),"'",""),"""","")
				
				if selde2=sel1 then
				tabella=codice
				end if
				if selde2=sel2 then
				tabella=note
				end if
				
				Finderd1=Cstr(Request.Form("finder"))
				Finderd2=replace(replace(trim(Finderd1),"'",""),"""","")
				
				If Len(page) > 0 And IsNumeric(page) Then
				page = CLng(page)
				Else
				Page = 1
				End If
				
				Rig = Rig + 1
				If Rig Mod 2 = 0 then
				color = "#EFEFEF"
				Else
				color = "#DBEDF2"	
				End if
				
				Set rscontol2 = Conn.Execute ("SELECT * FROM prodotti WHERE '" & tabella &"'='" & Finderd2 &"'")
Purtroppo però continuo a ricevere questo errore:
codice:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14' 

[MySQL][ODBC 3.51 Driver][mysqld-4.0.20-standard-log]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 '='123'' at line 1 

/public/prodotti_res.asp, line 142
Sapete aiutarmi?!
:master: