I have this PHP function that I want to get data from a database just by calling get_database_data()
In this function I have two variables that should be used in WHERE $variable1 = $variable2
.
I know you could use "WHERE ".$variable1." = ".$variable2
. It's works with $variable2
, but not $variable1
.
Something else I could use, or how do I make this work?
EDIT:
There is no errors, but the row I don't get any rows returned
EDIT2:
I've got it to work, using: "WHERE $variable1 = ".$variable2