Re: Stumped I Tell You!

From: Date: Fri, 25 Jul 2008 18:06:18 +0000
Subject: Re: Stumped I Tell You!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-277329@lists.php.net to get a copy of this message
On Fri, Jul 25, 2008 at 1:55 PM, Jay Blanchard <jblanchard@pocket.com> wrote: [snip!] > > $endBal = mysql_fetch_array($dbEnd); > echo mysql_num_rows($dbEnd); > print_r($endBal); > > Nothing gets returned from those last statements. Am I missing something > completely? Right here.... <?php // Code before.... if(!$dbEnd = (mysql_query($getEnd, $dbc))){ echo mysql_error() . "\n"; exit(); } // .... code after.... ?> You're merging assignment. Maybe you meant this: <?php if(($dbEnd = mysql_query($getEnd, $dbc)) === FALSE) { echo mysql_error() . "\n"; exit(); } ?> Or you could do it like I do: <?php $dbEnd = mysql_query($getEnd,$dbc) or die(mysql_error()); ?> -- </Daniel P. Brown> Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo.

« previous php.general (#277329) next »