In PHP you can do something like this:
But how would you do the same thing for a PHP array (Keeping the code simple)?Code:$MySQL_Query = "SELECT * FROM `sometable` WHERE `columnname`='" . $somePHPVariable . "';";
Here's an example of what I mean:
What I mean by simple is not using a fancy loop to create multiple ORs inside the SQL query construction.Code:$somePHPArray['0'] = "Bob"; $somePHPArray['1'] = "Jane"; $somePHPArray['2'] = "Henry"; $somePHPArray['3'] = "Amanda"; $somePHPArray['4'] = "Joe"; $MySQL_Query = "SELECT * FROM `sometable` WHERE `columnname`='" . $somePHPArray[?] . "';";
Is what I'm asking for possible?




Reply With Quote