Renne

I did a similar thing with asp, my query was like


SELECT COUNT(*) AS countresult, uniqueref FROM global  WHERE
PROPOSEDRELEASE <= 2002 and SURNAME = '"& globsurname & "' group by
uniqueref"


Im my asp code I referenced countresult

Hope this helps


John B

-----Original Message-----
From: Stitchin' [mailto:[EMAIL PROTECTED] 
Sent: 05 March 2003 04:08
To: [EMAIL PROTECTED]
Subject: Count (*) function results needed in echo statement

I've got the following code in my php file:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

 /* Select all categories from designcatagories table */
  $query = "SELECT designcatagories.catcode, designcatagories.catdesc,
count(*) FROM
            designs,designcatagories where designs.catcode =
designcatagories.catcode
            GROUP BY catcode";
  $result = mysql_query($query)
       or die ("Couldn't execute query.");

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I tested it in phpMyAdmin and I'm getting the correct results ....
here's my
dilemma ... I want to spit out a list of my catcodes, # designs found,
catdesc
and I'm not sure how to reference the count(*) object??? What I have
below
doesn't work, it just prints the () and I can't find any reference to
this
in my books??? HELP!!!

 echo "><b>$catcode</b></font>
          </td>
            <td>$count()</td>
          <td>$catdesc</td>
          </tr>";

Renee Toth
Stitchin' Up A Storm
www.stitchinupastorm.com



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php





---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to