-
While statement Not Working
$query = "SELECT ebw.manager_id AS managerid, ebw.finisher AS finisher, ebw.setup AS setup, ebw.music AS music FROM efed_bio_wrestling AS ebw LEFT JOIN efed_bio AS bio ON ( ebw.bio_id = bio.id) WHERE ebw.bio_id = $id"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_assoc($result); $managerid = $row['managerid']; This works however I need to figure out with the managerid if its 0 then that's when it puts None
-
While statement Not Working
That's always fun but its supposed to when it matches ewb.managerid to bio.id then get that row's charactername.
-
While statement Not Working
I came up with this and I'm getting closer however its saying that managerid is undefined. function getWrestling($style, $id) { $id=mysql_real_escape_string($id); if ($style=='singles') { $query = "SELECT ebw.manager_id AS managerid, ebw.finisher AS finisher, ebw.setup AS setup, ebw.music AS music FROM efed_bio_wrestling AS ebw LEFT JOIN efed_bio AS bio ON ( ebw.bio_id = bio.id) WHERE ebw.bio_id = $id"; $result = mysql_query($query) or die(mysql_error()); if($managerid != ''){ $query = "SELECT * FROM `efed_bio` WHERE id = '$managerid'"; $result = mysql_query($query); $row = mysql_fetch_assoc($result); $manager = $row['charactername']; } else{ $manager = 'None'; } while ($row = mysql_fetch_array($result)){ ?> <h2>Wrestling</h2> <table class="biotable" cellspacing="10px"> <tr class="biotablerowb"> <td class="biotableheadingb">Manager/Valet:</td> <td class="biotabledatab"><?php echo $manager ?></td> </tr> <tr class="biotablerowb"> <td class="biotableheadingb">Finisher:</td> <td class="biotabledatab"><?php if (strlen ($row['finisher']) < 1) { print "N/A"; } else { print $row['finisher'];}?></td> </tr> <tr class="biotablerowb"> <td class="biotableheadingb">Setup:</td> <td class="biotabledatab"><?php if (strlen ($row['setup']) < 1) { print "N/A"; } else { print $row['setup'];}?></td> </tr> <tr class="biotablerowb"> <td class="biotableheadingb">Entrance Music:</td> <td class="biotabledatab"><?php if (strlen ($row['music']) < 1) { print "N/A"; } else { print $row['music'];}?></td> </tr> </table> <?php } }?>
-
While statement Not Working
Okay this works, however, the value of manage_id needs to be compared to bio_id and then when it finds a matching row then get the bio.charactername field. SELECT ebw.manager_id AS manager, ebw.finisher AS finisher, ebw.setup AS setup, ebw.music AS music FROM efed_bio_wrestling AS ebw LEFT JOIN efed_bio AS bio ON ( ebw.bio_id = bio.id) WHERE ebw.bio_id = 6
-
While statement Not Working
I have error reporting turned on and none are being reported and when I run it in phpmyadmin no results are being returned for the echoed query.
-
While statement Not Working
I'm not getting an error message. Nothing is appearing for that function.
-
While statement Not Working
I don't think its it because here's the entire function it its entirety. function getWrestling($style, $id) { $id=mysql_real_escape_string($id); if ($style=='singles') { $query = "SELECT bio.charactername AS manager, ebw.finisher AS finisher, ebw.setup AS setup, ebw.music AS music FROM efed_bio_wrestling AS ebw JOIN efed_bio AS bio ON ( ebw.bio_id = bio.id) WHERE ( ebw.bio_id = '$id') AND ( ebw.manager_id = bio.id)"; $result = mysql_query($query) or die(mysql_error()); echo $query; while ($row = mysql_fetch_array($result)){ ?> <h2>Wrestling</h2> <table class="biotable" cellspacing="10px"> <tr class="biotablerowb"> <td class="biotableheadingb">Manager/Valet:</td> <td class="biotabledatab"><?php if (strlen ($row['manager']) < 1) { print "N/A"; } else { print $row['manager'];}?></td> </tr> <tr class="biotablerowb"> <td class="biotableheadingb">Finisher:</td> <td class="biotabledatab"><?php if (strlen ($row['finisher']) < 1) { print "N/A"; } else { print $row['finisher'];}?></td> </tr> <tr class="biotablerowb"> <td class="biotableheadingb">Setup:</td> <td class="biotabledatab"><?php if (strlen ($row['setup']) < 1) { print "N/A"; } else { print $row['setup'];}?></td> </tr> <tr class="biotablerowb"> <td class="biotableheadingb">Entrance Music:</td> <td class="biotabledatab"><?php if (strlen ($row['music']) < 1) { print "N/A"; } else { print $row['music'];}?></td> </tr> </table> <?php } }?> <?php if ($style=='tagteam') { } ?> <? if ($style=='manager') { $sql = "SELECT * FROM `efed_bio_wrestling` WHERE bio_id = '$id'"; $re = mysql_query($sql); $row = mysql_fetch_assoc($re); extract($row); ?> <h2>Wrestling</h2> <table class="biotable" cellspacing="10px"> <tr class="biotablerowb"> <td class="biotableheadingb">Manager/Valet:</td> <td class="biotabledatab"><?php if (strlen ($manager) < 1) { print "N/A"; } else { print "$manager";}?></td> </tr> <tr class="biotablerowb"> <td class="biotableheadingb">Entrance Music:</td> <td class="biotabledatab"><?php if (strlen ($music) < 1) { print "N/A"; } else { print "$music";}?></td> </tr> </table> <?php } ?> <? if ($style=='staff') { $sql = "SELECT * FROM `efed_bio_wrestling` WHERE bio_id = '$id'"; $re = mysql_query($sql); $row = mysql_fetch_assoc($re); extract($row); ?> <h2>Wrestling</h2> <table class="biotable" cellspacing="10px"> <tr class="biotablerowb"> <td class="biotableheadingb">Manager/Valet:</td> <td class="biotabledatab"><?php if (strlen ($manager) < 1) { print "N/A"; } else { print "$manager";}?></td> </tr> <tr class="biotablerowb"> <td class="biotableheadingb">Entrance Music:</td> <td class="biotabledatab"><?php if (strlen ($music) < 1) { print "N/A"; } else { print "$music";}?></td> </tr> </table> <?php } ?> <? if ($style=='stable') { } }
-
While statement Not Working
It has the bio_id of the wrestler and what it's supposed to do is get the manager_id and then take it to the efed_bio table and match that to the same integer and when it finds a match record then get that person's charactername and if there is a 0 for the value inside of manager_id then it says "N/A" function getWrestling($style, $id) { $id=mysql_real_escape_string($id); if ($style=='singles') { $query = "SELECT bio.charactername AS manager, ebw.finisher AS finisher, ebw.setup AS setup, ebw.music AS music FROM efed_bio_wrestling AS ebw JOIN efed_bio AS bio ON ( ebw.manager_id = bio.id) WHERE ebw.bio_id = '$id'"; $result = mysql_query($query) or die(mysql_error()); while ($row = mysql_fetch_array($result)){ ?> <h2>Wrestling</h2> <table class="biotable" cellspacing="10px"> <tr class="biotablerowb"> <td class="biotableheadingb">Manager/Valet:</td> <td class="biotabledatab"><?php if (strlen ($row['manager']) < 1) { print "N/A"; } else { print $row['manager'];}?></td> </tr> <tr class="biotablerowb"> <td class="biotableheadingb">Finisher:</td> <td class="biotabledatab"><?php if (strlen ($row['finisher']) < 1) { print "N/A"; } else { print $row['finisher'];}?></td> </tr> <tr class="biotablerowb"> <td class="biotableheadingb">Setup:</td> <td class="biotabledatab"><?php if (strlen ($row['setup']) < 1) { print "N/A"; } else { print $row['manager'];}?></td> </tr> <tr class="biotablerowb"> <td class="biotableheadingb">Entrance Music:</td> <td class="biotabledatab"><?php if (strlen ($row['music']) < 1) { print "N/A"; } else { print $row['music'];}?></td> </tr> </table> <?php } }?>
-
Seeking Major Feedback
This site was designed by buddy of mine that I paid some good money to create a new design for my professional wrestling company. I was just curious to know what everybody thought of the following pages like the typography/layout css structure of each page for anyone who is bored and wouldn't mind looking them over to see what they thought. http://www.kansasoutlawwrestling.com Subpages http://kansasoutlawwrestling.com/archives/542 http://kansasoutlawwrestling.com/roster http://kansasoutlawwrestling.com/bio?username=cruz http://kansasoutlawwrestling.com/champions http://kansasoutlawwrestling.com/titlehistory http://kansasoutlawwrestling.com/previewcard http://kansasoutlawwrestling.com/latestresults http://kansasoutlawwrestling.com/eventarchives http://kansasoutlawwrestling.com/gallery http://kansasoutlawwrestling.com/radio