Re: mysql_query() not working

From: Date: Thu, 04 Mar 2010 15:05:43 +0000
Subject: Re: mysql_query() not working
References: 1  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-7460@lists.php.net to get a copy of this message
On Thu, Mar 4, 2010 at 08:47, Vinayak Korape <vinichakra@gmail.com> wrote: > Hello Sir, > > My code is as following. > > > *    $query0 = "START TRANSACTION"; >    mysql_query($query0) or die(mysql_error()); >  * > *  $query1 = "SELECT * FROM CallingData WHERE FileId = '$fileid' AND > CalledDataId = '0' AND RecordStatus = 'Not > Reading' AND AgentId = '0' AND RecordId >= '$startid' AND RecordId > <= > '$endid' LIMIT 0, 1";* > *    $result1 = mysql_query($query1) or die(mysql_error()); >    echo $query1; >    echo "<br>"; >    echo $result1; >    $count1 = mysql_num_rows($result1); >    echo "<br>"; >    echo $count1; > * > > > When i run the result of echo $query1 in phpmyadmin it returns me one > recordset, but the result of echo $count1 is 0(Zero). > May be the query1 is not getting executed. What are the possible reasons for > that and how can i fix this problem. Please help me. We help those who help themselves. And right now, we're not helping, because you're writing to the wrong place. http://php.net/support -- </Daniel P. Brown> daniel.brown@parasane.net || danbrown@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Looking for hosting or dedicated servers? Ask me how we can fit your budget!

« previous php.webmaster (#7460) next »