From owner-freebsd-questions Fri Aug 9 10:29:47 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 03F6037B400 for ; Fri, 9 Aug 2002 10:29:44 -0700 (PDT) Received: from mail.thundernet.cz (mail.thundernet.cz [62.77.87.114]) by mx1.FreeBSD.org (Postfix) with SMTP id 509E043E75 for ; Fri, 9 Aug 2002 10:29:33 -0700 (PDT) (envelope-from neuhauser@bellavista.cz) Received: (qmail 20350 invoked from network); 9 Aug 2002 15:56:21 -0000 Received: from unknown (HELO freepuppy.bellavista.cz) (62.168.44.50) by mail.thundernet.cz with SMTP; 9 Aug 2002 15:56:21 -0000 Received: by freepuppy.bellavista.cz (Postfix, from userid 1001) id 6BD913F; Fri, 9 Aug 2002 17:56:18 +0200 (CEST) Date: Fri, 9 Aug 2002 17:56:18 +0200 From: Roman Neuhauser To: MET Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Off the Main Topic || Supplied argument is not a valid MySQL result resource Message-ID: <20020809155618.GG389@freepuppy.bellavista.cz> Mail-Followup-To: MET , freebsd-questions@FreeBSD.ORG References: <001801c23fbc$879e5f60$6701a8c0@SURVIVAL> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001801c23fbc$879e5f60$6701a8c0@SURVIVAL> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > From: "MET" > To: > Subject: Off the Main Topic || Supplied argument is not a valid MySQL result resource > Date: Fri, 9 Aug 2002 11:50:47 -0400 > > I realize that this is off topic, but I'm sending it to more specific > PHP lists as well but none of them have such helpful people on them. > > I'm getting some massive errors on some pretty simple code. Included > are the errors as well as the PHP function that is giving me issues. > Any help would be greatly appreciated. And the weirdest thing, is that > the code used to work.... ?? > Warning: Supplied argument is not a valid MySQL result resource in > D:\Gunks\NewSite\phpAds\view.inc.php3 on line 267 > $sqlm = "SELECT MIN(bannerID), MAX(bannerID) FROM > banners WHERE active='true';"; > > $resultm = mysql_query($sqlm); > > $RSM = mysql_fetch_array($resultm); So, this is all that was really needed along with saying which line in your script is the "line 267". Anyway, just a wild guess: remove the semicolon from the SQL query. And a solution: put a "echo mysql_error($resultm);" just after the mysql_query($sqlm) line. -- FreeBSD 4.6-STABLE 5:52PM up 5:47, 8 users, load averages: 0.00, 0.00, 0.00 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message