Re: [PHP-WIN] Thoughts on real cause of a 500 internal server error

2012-03-12 Thread Jacob Kruger
Ok, cool. Thanks. Think I got that idea since in all the mysqli tutorial material I went through, they had them in that order: $res = $mysqliObj->query(...); $res->data_seek(); if ($res->num_rows > 0) { $row = $res->fetch_assoc(); } etc. etc. - often enough slightly different, but you get

Re: [PHP-WIN] Thoughts on real cause of a 500 internal server error

2012-03-12 Thread Jacob Kruger
That does make sense, and will definitely look into reordering the code to first check that something has been returned, but was actually under impression that had to execute data_seek(0) before could retrieve num_rows property, but, this does actually make more sense, but, you'll see in my other

Re: [PHP-WIN] Thoughts on real cause of a 500 internal server error

2012-03-12 Thread Jacob Kruger
OK, feel silly now. As soon as I implemented real error handling, it told me that the $dbPassword variable was undefined, and thus the connection to the mySQL server while it had gone through, was not allowed to actual render a result set as such, due to permissions. Seems that while have be

[PHP-WIN] Thoughts on real cause of a 500 internal server error

2012-03-12 Thread Jacob Kruger
In the below bit of code, that last line causes server to bomb out with an HTTP 500 Internal Server Error, but, for example if I comment out that line, and get it to echo the $sql string value, that I can quite happily get it to run via a form of query analyzer, returning a record set, etc., but