Re: syntax error

From: Date: Mon, 21 Jul 2008 21:51:58 +0000
Subject: Re: syntax error
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-277154@lists.php.net to get a copy of this message
Please keep replies on list for all to benefit and be able to assist. On Mon, Jul 21, 2008 at 5:47 PM, Ronald Wiplinger <tm.ronald@gmail.com> wrote: > > On Tue, Jul 22, 2008 at 1:51 AM, Daniel Brown <parasane@gmail.com> wrote: >> >> Try this: >> >> > $result = mysql_query($sql,$db) or die(mysql_error()); Did you try my suggestion above? If so, did you receive any errors? > echo "result=$result<br>"; > $num=mysql_num_rows($result); > echo "num=$num"; > > I get: > > result= > num= The most you'd get from $result in this case would be a resource identifier message, because that's all mysql_query() returns. And since the resource link doesn't seem to be correctly established, $num will be empty. -- </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 (#277154) next »