๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #7567

erro al pretender contar desde php contra mysql

#7567
From: [ZoRo]
Date: Sat, 15 Feb 2003 15:04
15 lines
1423 bytes
Hola con este codigo en php contra una mysql pretendo saber, contar, si hay
usuarios con un nick concreto

$result = mysql_query ("select count(*) as cuenta  from usuarios where
nick='$nick'");
$row = mysql_fetch_assoc ($result);
$cuantos=$row["cuenta"];

pero esto me da este error:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result
resource in /home/usuario/pagina.php on line 317
siendo la linea 317 esta: $row = mysql_fetch_assoc ($result);

Me podr๏ฟฝais decir porque esta mal?
gracias
Technical Details
Message-ID: <b2lktn$1da7rm$1@ID-59646.news.dfncis.de>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!217-127-108-221.uc.nombres.ttd.ES!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: PORTUGUESE,ASCII
X-Google-Thread: f86c8,87626d83aff48a11,start
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-02-15 07:04:25 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!217-127-108-221.uc.nombres.ttd.ES!not-for-mail
From: "[ZoRo]" <granbilbao_NOSPAM_@latinmail.com>
Newsgroups: es.comp.os.linux.programacion
Subject: erro al pretender contar desde php contra mysql
Date: Sat, 15 Feb 2003 16:04:22 +0100
Lines: 17
Message-ID: <b2lktn$1da7rm$1@ID-59646.news.dfncis.de>
NNTP-Posting-Host: 217-127-108-221.uc.nombres.ttd.es (217.127.108.221)
X-Trace: fu-berlin.de 1045321463 47521654 217.127.108.221 (16 [59646])
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106