Re: MySQL error message...

From: Date: Tue, 01 Jul 2003 03:49:13 +0000
Subject: Re: MySQL error message...
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-28983@lists.php.net to get a copy of this message
hi, mysql_query("$command",$mysqlHandle); should actually be mysql_query($command,$mysqlHandle); it works for me. i did not understand rest ur code. but i think should do it. try this and get back if still facing problems. regards, -shiva "Keith Spiller" <larentium@hosthive.com> wrote in message news:020901c33f27$57075a80$28056f0a@ecron... > Hello, > > Does anyone know what would cause this message? > > Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result > resource in c:\program files\easyphp\www\bod-rse\bod\menu.php3 on line 49... > > Here is the code: > > <? > $command = "SELECT * FROM central_fakepaths WHERE menu != '0' ORDER BY menu > ASC"; > $result = mysql_query("$command",$mysqlHandle); > $path_directory=explode("/", $HTTP_SERVER_VARS["REQUEST_URI"]); > > while ($myrow = mysql_fetch_row($result)) > { > $count++; > > If ($path_directory[1]=="$devsite") { $path = $myrow[9]; $target = > $myrow[10]; } > else { $path = $myrow[7]; $target = > $myrow[3]; } > > If ($myrow[5] != $count) > { echo "<img src=\"images/menu-line.gif\" width=\"139\" > height=\"7\"><br>\n"; > $count++; > } > > // IF MENU VALUE == COMMITTEES > if ($myrow[2] == "Committees") > { > > echo "<font face=Verdana size=1><img src='images/menu-line.gif' > width=139 height=7><BR> > &nbsp; <a href='.' > target='_top'>Committees</a><BR> > <img src='images/menu-line.gif' width=139 > height=7><BR>"; > > $currdate = date("Y-m",time()); > $cdate = explode("-" , $currdate); > $cyear = $cdate[0]; > $cmonth = $cdate[1]; > > if ($cmonth >=7 AND $cmonth <=12) $fyear = $cyear + 1; > else $fyear = $cyear; > $fyear2 = $fyear - 1; > $syear = "$fyear2 - $fyear"; > > $commandw = "SELECT menuname, type, active, name FROM bod_board_boards > WHERE type='committee' AND active='1' ORDER BY name ASC"; > $resultw = mysql_query("$commandw",$mysqlHandle); > while ($myroww = mysql_fetch_row($resultw)) > { > if ($myroww[0] !="") > { > echo "&nbsp; <a href='committees.php?bord=$bord&comm=$myroww[3]' > target='_top'>$myroww[0]</a><BR>"; > } > } > > //echo "&nbsp; <a href='?bord=$bord' > target='_top'>What They Do</a>"; > } > > else > { > echo "&nbsp; <a href='$path' > target='$target'>$myrow[2]</a><br>\n"; > } > } > > ?> > > > Any help would be unendingly appreciated... > > > Keith >

« previous php.db (#28983) next »