simplified loop
Posted: Tue Aug 24, 2004 11:29 am
I'm trying to make this as simple as I can for folks to understand in hopes that someone will see something that I am not. I am trying to loop through a value via php so that a mysql call can see the value. The mysql call does work for connecting to the database. My problem is the value that is being seen in the variable is only the last value being pulled, not cycling through each. $tccategoryDetail->tccategory_id[$c] below will echo as 367 where 3 is one value 6 is another and 7 is another. But in the query, the call seems to only be seeing it as 7, instead of running as 3, then 6 then 7.. Anyone know why this would loop that way? (or lack thereof)
Code: Select all
for ($c=0;$c<$compttccategoryDetail;$c++) {
$tmpquery12 = "WHERE tcsub_category.category_id = '".$tccategoryDetail->tccategory_id[$c]."'";
}