Possible Duplicate:
Can PHP PDO Statements accept the table name as parameter?
Can you use a named parameter in the SELECT portion of a query?
Example:
$stmt = $conn->prepare('SELECT Available, UserFileName, NameOnServer, :levelid FROM productpage WHERE productID = :prodid');
$stmt->execute(array('levelid'=> $LevelCheck, 'prodid'=> $ProductID));
In the code above, "levelid" does not seem to work ($LevelCheck is defined above the included code)
If I replace the named parameter with an actual column name, it works fine.
If this isn't possible, I was wondering if anyone might have a suggestion for me? There are different columns and the user specifies which column to search.
Thank You for taking the time to look at this!