nested recordset
Hi, its been a while since I done this, but wanted to find out what I have done wrong with this nested recordset inside a while loops. I think its to do with my bindParam section
<?php
$rsProjects = new WA_MySQLi_RS("rsProjects",$simplygreendb,0);
$rsProjects->setQuery("SELECT * FROM projects WHERE status = '1'");
$rsProjects->execute();
?>
<?php
while(!$rsProjects->atEnd()) {
?>
repeat some stuff here...........
<?php
$rsProjectImages = new WA_MySQLi_RS("rsProjectImages",$simplygreendb,0);
$rsProjectImages->setQuery("SELECT * FROM images WHERE ImageProjectID = ?");
$rsProjectImages->bindParam("i", "".$rsProjects->getColumnVal("ProjectID") ."", "-1"); //colname
$rsProjectImages->execute();
?>
<?php
while(!$rsProjectImages->atEnd()) {
?>
repeat some stuff here...........
<?php
$rsProjectImages->moveNext();
}
$rsProjectImages->moveFirst(); //return RS to first record
?>
<?php
$rsProjectImages->moveNext();
}
$rsProjectImages->moveFirst(); //return RS to first record
?>
Regards
Chris
Opps sorted I had an extra while loop