View Single Post
Old 09-18-2007   #3 (permalink)
Gjbphp
PHP Lover
 
Join Date: May 2007
Location: Zug, Switzerland
Posts: 91

Quote:
Originally Posted by The Eagle View Post
PHP Code:
$numberOfEntries getNumRows("photopost_photos""id > 0");
$desirednumber $numberofentries 12

Gotcha, PHP is a case-sensitive language

$numberOfEntries and $numberofentries are totally different variables. This little mistake lead to catastrophic consequences later in the script, namely to what I believe is a simple out-of-memory error during the execution of getRows(). Anyway, I hope this fixes it.
Yeah that should fix it, if not send me your phperror log and I'll tell you what the problem is Btw with PHP, 500 error messages can also be caused by something silly like htaccess files, although that usually applies to a shared hosting environment.

One other tip that I can share with you is that when you are naming variables, instead of using upper and lowercase names like:
PHP Code:
$numberOfEntries 
try using
PHP Code:
$number_of_entries 
it is slightly longer, but at least you don't have to worry about typing all the capital letters in exactly the right places.
Gjbphp is offline