was in the if block and elsif wasn't getting it. Regarding your question re bind_param() I was having a problem with failing to match know rows with simply using placeholders and someone suggested bind_param() and it worked so now I am cargo-cult programming and doing waht has worked without asking if it was a mere coincidence in the first place. Re using the array whole, I don't use the first element.