(correction) nesting mySQL queries/while statements

From: Date: Sat, 06 Jan 2001 04:09:33 +0000
Subject: (correction) nesting mySQL queries/while statements
Groups: php.general 
Request: Send a blank email to php-general+get-33008@lists.php.net to get a copy of this message
OK, I can see right off that the mysubrow is a problem. But I still get the same breakage when I have it this way: ------------- $result = mysql_query("SELECT DISTINCT lastname FROM content WHERE flavor=$flavorsku",$db);
    while ($myrow = mysql_fetch_array($result)) {
        printf ("<b>%s</b><br> \n<ul>", $myrow["lastname"]);
        $lastname = ($myrow["lastname"]);
        $result = mysql_query("SELECT * FROM content WHERE lastname=$lastname",$db);
        while ($myrow = mysql_fetch_array($result)) {
printf("<a href=\"%s?sku=%s\">%s %s: %s</a><br> \n", $PHP_SELF, $myrow["sku"], $myrow["firstname"], $myrow["lastname"], $myrow["title"]); } -------------- Thanks, Maurice -- Maurice Rickard http://mauricerickard.com/

« previous php.general (#33008) next »