Forgive me as this is probably a 101 question but I'm having no luck wrapping my head around it.
I'm working with a mysqli->prepare statement and
"Select * FROM someTable WHERE someTable.column = 1"
- Works beautifully
We can make it dynamic by passing the variable with the use of a ? and a bind param.
"Select * FROM someTable WHERE someTable.column = ?"
- Works beautifully
My desire was to build a statement that let me pass "someTable.column = 1" dynamically
"Select * FROM someTable WHERE ?"
I figured the method was a total bust but tried testing it by passing on the variable "1 = 1" and it worked?!
So if I can pass "1=1", then why couldn't I pass "someTable.column = 1"
I've done this with MySQL in the past by building the statement and inserting it all at one time. I was just hoping there was another way.