Well, in this code, you are going to receive one line from your table that
displays the total number of records. And that is it. Here is a sample from
one of my tables, using the MySQL CLI:

mysql> select count(*) from locker;
+----------+
| count(*) |
+----------+
|       47 |
+----------+
1 row in set (1.65 sec)



If you can be a little more specific about what you want, maybe type up what
you expect out, we can fix your query statement.


Also, in this line:
>> <b><?php echo $record_count ?> </b></font>

You should put a ';' after the variable, just to save yourself the hassle of
a parse error, when you get working code.

On 4/9/01 9:32 AM, "Michael O'Neal" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I'm trying to display a record count of some sort on a page I'm working
> on.  For example, "Record 1 of 15".  I can display the 1st number ok, but
> I'm a bit confused on what the count function should look like for the
> 2nd number (15, in this case).  Here is my current (not working) code.
> 
>>  <?php
>> 
>>   $query = "SELECT count(*) FROM mango_pr";
>>   $result = mysql_query($query);
>>   $record_count = mysql_fetch_row($result);
>> 
>> 
>> ?>
> 
> 
> And then I'm calling the code with an "echo"  later on:
> 
>> <b><?php echo $record_count ?> </b></font>
> 
> 
> This obviously isn't right...can anyone offer any suggestions?
> 
> Thanks,
> 
> mto
> 
> 
> 
> Michael O'Neal
> Web Producer/ Autocrosser
> ST 28 '89 Civic Si
> ---------------------
> M   A   N   G   O
> B  O  U  L  D  E  R
> ---------------------
> http://www.thinkmango.com
> [EMAIL PROTECTED]
> p-303.442.1821
> f-303.938.8507
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to