| PLEX86 | ||
|
Zend Development and erroneous buttignment Condition bugsLiam, I'm not familiar with the Zend IDE. I'm downloading now for a test drive. However, I tried looking at your problem from a code perspective. I pulled this example from php.net's mysqlfetcharray description: mysqlconnect("localhost", "mysqluser", "mysqlpbuttword") or die("Could not connect: " . mysqlerror()); mysqlselectdb("mydb"); $result = mysqlquery("SELECT id, name FROM mytable"); while ($row = mysqlfetcharray($result, MYSQLNUM)) { printf("ID: %s Name: %s", $row0, $row1); } can't get htaccess in Apache to work This is driving me nuts. No matter what I do, what changes I make in httpd.conf, how I make .htaccess, I can't get... They use the optional second argument, but otherwise your code is identical. Normal while iterations are conditional, evaluating the statement at the beginning of each iteration. Using buttignment in a while condition check should always evaluate to true, looping forever. Thus, tripping up the Zend bug engine. However, mysqlfetcharray function uses an internal data pointer to travel the array incrementally. When it reaches the end of the array, it causes the while to evaluate to false, breaking out of the loop. If you were to use an equality evaluator (==), it would always evaluate as false, as $rowpbutt will never equal mysqlfetcharray( $resultpbutt ) The Zend bug engine should recognize such special functions. It apparently does not. Incidentally, I don't like using the mysqlfetcharray function because of this. It hides what's going on. To me, a programmer should be able to look at code and immediately recognize the logical progression. Nowhere in this code can we see the data pointer advancing through the array. It's confusing to someone not intimately familiar with the standard library. hardware graphics acceleration 3067 On Sun, 27 Feb 2005 20:08:06 GMT, Mark Hobley staggered into the Black Sun and said: Point 1 is true; point 2... Because of this--even though it takes a little more time--I always use results. It's easier to read and immediately understand. Sorry I couldn't help with the Zend problem, though. Good luck, -Dan Like should I've without connect has
|
||||
can't get htaccess in Apache to work Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||