Topic: Complex select with variable and data
Hi guys,
I feel super dumb but I can't get my head around this very simple yet super annoying issue.
I've got this query in a script but the compiler is insulting me when I try to compile with too many arguments or the location of a ";" ,etc..
I have tried many combinations but I really miss how it should be written.
The value tPCName is retrieved from a text field in a form.
'SELECT * from Logs where Old_PC_Name='+tPCName+' or New_PC_Name='+tPCName+' and src='Computers';';
This one is telling me the ";" is expected right before Computers like this:
'SELECT * from Logs where Old_PC_Name='+tPCName+' or New_PC_Name='+tPCName+' and src=';Computers';';