Mailing List Archive



Back to the month index Back to the list index

Darrell Schulte (dschulte@facstaff.wisc.edu)
Mon, 26 Apr 1999 09:10:04 -0500


Message-Id: <v04020a27b34a24208062@[144.92.15.71]>
Date: Mon, 26 Apr 1999 09:10:04 -0500
From: Darrell Schulte <dschulte@facstaff.wisc.edu>
Subject: Re: N# of results ?

At 9:52 AM -0400 4/26/99, F.L. scrawled:
+Hi,
+
+is there a simple instruction to display the number of valid results in a
+query ?
+
+ex. result : Bambi
+ Fernando
+ Joshua
+
+gives : 3 (matches found)

Fabrice,

Try,

$res = msqlStoreResult();
$num_row = msqlNumRows($res);

Darrell
_____________________________________________________________________
          Darrell A. Schulte - dschulte@facstaff.wisc.edu
 University of Wisconsin-Madison - Office of News and Public Affairs
  The Why Files http://whyfiles.news.wisc.edu - The Graduate School
102A Bascom Hall, 500 Lincoln Drive - Madison WI 53706 (608) 265-8551
From killianw@wishard.edu Mon Apr 26 10:27:09 1999
Received: from cosplay.wmh.iupui.edu (cosplay.wmh.iupui.edu [134.68.32.96])
        by services.bunyip.com (8.8.5/8.8.5) with ESMTP id KAA13524
        for <msql-list@services.bunyip.com>; Mon, 26 Apr 1999 10:27:08 -0400 (EDT)
Received: from mail.wishard.edu (mail.wishard.edu [134.68.32.227])
        by cosplay.wmh.iupui.edu (8.9.1a/8.9.1) with ESMTP id JAA20198;
        Mon, 26 Apr 1999 09:27:03 -0500
Received: from WMHMAIL/SpoolDir by mail.wishard.edu (Mercury 1.21);
    26 Apr 99 09:27:04 EST
Received: from SpoolDir by WMHMAIL (Mercury 1.30); 26 Apr 99 09:26:51 EST
Received: from wishard.edu by mail.wishard.edu (Mercury 1.30) with ESMTP;
    26 Apr 99 09:26:44 EST
Message-ID: <372469C8.7EB9F04B@wishard.edu>
Date: Mon, 26 Apr 1999 09:27:36 -0400
From: Warren Killian <killianw@wishard.edu>
Organization: Wishard Health Services
X-Mailer: Mozilla 4.51 [en] (Win95; U)
X-Accept-Language: en
MIME-Version: 1.0
To: lecorre@magic.fr
CC: Multiple recipients of list <msql-list@services.bunyip.com>
Subject: Re: N# of results ?
References: <001101be8feb$e3a9dfc0$0100a8c0@lecorre.magic.fr>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Transfer-Encoding: 7bit

"F.L." wrote:
>
> Hi,
>
> is there a simple instruction to display the number of valid results in a
> query ?
>
> ex. result : Bambi
> Fernando
> Joshua
>
> gives : 3 (matches found)
>
> Thanks
> Fabrice Le corre
> webmaster@wallis-islands.com

Hi Fabrice,

Try the numRows() function. For example:

$res = /* The result of your query. */
$matches = numRows($res);
echo("There are $matches matches found.\n");

Hope this helps.

-- 
Thank you,
Warren Killian
From tony@essex.ac.uk  Mon Apr 26 10:41:42 1999
Received: from seralph10.essex.ac.uk (seralph10.essex.ac.uk [155.245.240.160])
	by services.bunyip.com (8.8.5/8.8.5) with ESMTP id KAA13808
	for <msql-list@services.bunyip.com>; Mon, 26 Apr 1999 10:41:40 -0400 (EDT)
Received: from sernt7.essex.ac.uk ([155.245.240.174])
	by seralph10.essex.ac.uk with esmtp (Exim 2.05 #3)
	id 10bmZi-0005f4-00
	for msql-list@services.bunyip.com; Mon, 26 Apr 1999 15:41:34 +0100
Received: by sernt7.essex.ac.uk with Internet Mail Service (5.5.2448.0)
	id <JQAAK4SF>; Mon, 26 Apr 1999 15:41:31 +0100
Message-ID: <C8716114D691D211B88B08002BB704C22DA348@sernt7.essex.ac.uk>
From: "Lawson, Tony" <tony@essex.ac.uk>
To: "'msql-list'" <msql-list@services.bunyip.com>
Subject: installing under Linux
Date: Mon, 26 Apr 1999 15:41:30 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
	charset="iso-8859-1"

I am having problems installing msql under Linux.

The version of msql is 2.0.9. It is SuSE Linux (2.0.34)

It seems that whenever there is an "snprintf" call, the programs give a segmentation violation. Changing the snprintf to sprint statements seems to fix the problem.

However, a small test prgram with one call to snprintf executes without problems.

I have had a similar problem before with an earlier version of msql with Slackware Linux, where the problem appeared to be fprintf.

Any ideas??