🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #951

Re: php bad argument

#951
From: Kristoffel
Date: Thu, 02 Mar 2006 20:55
30 lines
1814 bytes
Scorpio wrote:
> ik heb deze functie 
> 
>  function Level ($ctid)
>   {
>   $sql = "select * from $cat_tbl where catfatherid = $ctid order by catname 
> ";    
>   $result = mysql_query ($sql);
>   while ($row = mysql_fetch_array($result))
> {
>     print $row["catname"];
>    print "</br>";
> }
> }
> 
> 
> 
> error : bad argument in mysql_fetch_array()
> 
> nooby

Ik kan jouw error niet simuleren.

Daarom enkele tips die misschien iets oplossen:
- is $cat_tbl gekend in de functie? Heeft $ctid steeds een waarde?
- Print $sql eens uit in de functie.
- wat gebeurt er als je 'mysql_fetch_row' ipv 'mysql_fetch_array' gebruikt?

--
  Kristoffel
Technical Details
Message-ID: <GYINf.290410$zK1.9270318@phobos.telenet-ops.be>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!hwmnpeer01.lga!hwmnpeer01.ams!hwmedia!news.highwinds-media.com!nntp.telenet.be!kwabbernoot.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail
References: <Xns97799CF0A3A13mannonskynetbe@195.238.0.34>

Show Full Headers
Complete Article Headers
X-Google-Thread: fcea4,e528e9a1f4cffcb0
X-Google-Attributes: gidfcea4,public
X-Google-Language: DUTCH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!hwmnpeer01.lga!hwmnpeer01.ams!hwmedia!news.highwinds-media.com!nntp.telenet.be!kwabbernoot.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail
From: Kristoffel <noname_nomail.nospam@yahoo.com>
User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: be.comp.programming
Subject: Re: php bad argument
References: <Xns97799CF0A3A13mannonskynetbe@195.238.0.34>
In-Reply-To: <Xns97799CF0A3A13mannonskynetbe@195.238.0.34>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 30
Message-ID: <GYINf.290410$zK1.9270318@phobos.telenet-ops.be>
Date: Thu, 02 Mar 2006 20:55:02 GMT
NNTP-Posting-Host: 213.119.206.172
X-Complaints-To: abuse@telenet.be
X-Trace: phobos.telenet-ops.be 1141332902 213.119.206.172 (Thu, 02 Mar 2006 21:55:02 MET)
NNTP-Posting-Date: Thu, 02 Mar 2006 21:55:02 MET
Organization: Telenet Internet