🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #733

Re: hola tengo una pregunta, como se cuando mysql tiene una tabla vacia?

#733
From: Eduardo Yáñez Parareda
Date: Wed, 07 Feb 2007 11:55
14 lines
1285 bytes
>    rs = MysqlConect.consultar("SELECT "+campo+" FROM "+tabla);
>     if (rs != null) {
>        System.out.println("La tabla NO esta vacia");
>        return rs;
>     }
>     else {
>        System.out.println("La tabla esta vacia");
>        return null;
>     }

Siempre deber�as obtener un objeto ResultSet, luego con usar

if (!rs.next()) te deber�a bastar.
Technical Details
Message-ID: <52tt74F1q19p5U1@mid.individual.net>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <1170793484.079758.23890@j27g2000cwj.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1116f3,2e50da9d7e7b21b3
X-Google-Attributes: gid1116f3,public
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Eduardo Yáñez Parareda
 <eduardo.yanezNOSPAM@NOSPAMgmail.com>
Newsgroups: es.comp.lenguajes.java
Subject: Re: hola tengo una pregunta, como se cuando mysql tiene una tabla
 vacia?
Date: Wed, 07 Feb 2007 12:55:15 +0100
Lines: 14
Message-ID: <52tt74F1q19p5U1@mid.individual.net>
References: <1170793484.079758.23890@j27g2000cwj.googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net SzLLoD6nBqk9BmjP6i1SEACzswyOqPDT2gjCXaDussFqQYCRrs
User-Agent: Thunderbird 1.5.0.9 (X11/20070130)
In-Reply-To: <1170793484.079758.23890@j27g2000cwj.googlegroups.com>