Query Issues
Posted: Mon Sep 22, 2008 1:28 pm
I've got a question about a selection query, where i need to select a set of values based on parameters stored in an array.
i'd like the output query to resemble something similar to.. SELECT * FROM ingredientlist WHERE ingredientID='$ingredientID[1]' && ingredientID='$ingredientID[2]' && ingredientID='$ingredientID[3]' and so on...
how do i loop through this? i can't figure it out for the life of me..
thankyou very much for any replies
Code: Select all
$query = "SELECT * FROM ingredientlist WHERE ingredientID='$ingredientID[]'";i'd like the output query to resemble something similar to.. SELECT * FROM ingredientlist WHERE ingredientID='$ingredientID[1]' && ingredientID='$ingredientID[2]' && ingredientID='$ingredientID[3]' and so on...
how do i loop through this? i can't figure it out for the life of me..
thankyou very much for any replies