Array causing page to fault
Posted: Sat Aug 16, 2003 5:15 pm
Hi all,
I'm so dissapointed. I spent all night getting this page working (there's a LOT more than is shown here) and as i was about to retire to bed all pleased with myself I ran it again to admire the new page and the browser showed a blank (white) page.
eh?! I though. What's all this about.
I figuired I've pressed a key somewhere in my code and start to go thru it line by line commenting out each line to find the offending line.
I end up, having THIS line (of all the lines) that is causing my page not to load:
I just don't understand it?! It works on EVERY page I've got, it work(ed) on this page until for some reason it decided not to. I've even re-booted the pc (Mac
) and it still does the same thing.
The only way I can get the page to load (without database content) is by commenting out the line as per below:
If ANYONE has even the foggiest of what wierd voodoo mojo has gone on here I'd love to hear your thoughts...
SOB
All that work, and then THIS!?!?!?
thanks heaps,
Rob
I'm so dissapointed. I spent all night getting this page working (there's a LOT more than is shown here) and as i was about to retire to bed all pleased with myself I ran it again to admire the new page and the browser showed a blank (white) page.
eh?! I though. What's all this about.
I figuired I've pressed a key somewhere in my code and start to go thru it line by line commenting out each line to find the offending line.
I end up, having THIS line (of all the lines) that is causing my page not to load:
Code: Select all
$ShowMax = mysql_num_rows($content);I just don't understand it?! It works on EVERY page I've got, it work(ed) on this page until for some reason it decided not to. I've even re-booted the pc (Mac
The only way I can get the page to load (without database content) is by commenting out the line as per below:
Code: Select all
$dir = "DESC";
mysql_select_db($dbname);
$sql = "SELECT * FROM archives ORDER BY id $dir";
$content = mysql_query($sql);
$Xcontent = mysql_fetch_array($content);
//Show the date picker menu
print "<a href="archives_yearly.php?yearly=2003">2003 - </a>";
print "<a href="archives_yearly.php?yearly=2002">2002 - </a>";
print "<a href="archives_yearly.php?yearly=2001">2001 <br><br></a>";
//Setup array for month sorting
$aMonths = array();
//show 12 months worth of $month ERROR ERROR ERROR!!! WHY!?!?!
//$ShowMax = mysql_num_rows($content);If ANYONE has even the foggiest of what wierd voodoo mojo has gone on here I'd love to hear your thoughts...
SOB
thanks heaps,
Rob