Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Total Members

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-24-2004, 05:50 PM
 
TheComputerGuy TheComputerGuy is offline
 

Member
  
Join Date: Aug 2004
Posts: 21
 

Default Total Members

Hi there,
I need to get the total number of registered users I have in my database out. I also would like to get the total online.

How would I do that??

I would appreciate any advice,

Chris
__________________
Chris Dildy
Reply With Quote
  #2  
Old 10-25-2004, 11:59 AM
  lildawg's Avatar 
lildawg lildawg is offline
 

X-Adept
  
Join Date: Jan 2003
Location: Utah
Posts: 686
 

Default

What do you mean by out? I am a little bit confused on what you are trying to do please explain a little better.
Reply With Quote
  #3  
Old 10-25-2004, 12:28 PM
 
pmstudios pmstudios is offline
 

Senior Member
  
Join Date: May 2004
Posts: 133
 

Default

There's already a Users online module you could use. Take a look in skin1/modules/Users_online/

To get the total number of registered customers in your database
Code:
$result = mysql_query("SELECT login FROM $sql_tbl[customers] WHERE usertype='C'"); $total_registered_users = mysql_num_rows($result); $smarty->assign("total_registered_users", $total_registered_users);


P.S. You should put your X-Cart version in your forum signature
__________________
X-Cart 4.0.5
MySQL: 3.23.58
PHP 4.3.2
Reply With Quote
  #4  
Old 10-26-2004, 03:48 AM
  groovico's Avatar 
groovico groovico is offline
 

X-Man
  
Join Date: Apr 2003
Location: Firetanksoftware.com
Posts: 2,326
 

Default

If you want to export customer details you can use quite a few of our x-cart add ons for this type of thing.

http://www.firetanksoftware.com/x-cart-addon-features.html
__________________
Groovico

Used by X-carters the world over:
Marketing Manager Pro Bundle For X-cart
Featured Product Manager for X-cart
Feed manager pro for X-cart

http://www.firetanksoftware.com

Celebrating 7 Years of providing quality X-cart Add ons and X-cart Mods for x-cart 3.X to X-cart 4.4.X
Reply With Quote
  #5  
Old 10-27-2004, 01:14 PM
 
TheComputerGuy TheComputerGuy is offline
 

Member
  
Join Date: Aug 2004
Posts: 21
 

Default

$total_registered_users

Would that be what I put in the template?
__________________
Chris Dildy
Reply With Quote
  #6  
Old 10-27-2004, 01:21 PM
 
pmstudios pmstudios is offline
 

Senior Member
  
Join Date: May 2004
Posts: 133
 

Default

Quote:
Originally Posted by TheComputerGuy
$total_registered_users

Would that be what I put in the template?


Yes, in the template you would use {$total_registered_users}

If you want to display the total on every page, you'll need to include the PHP code from my previous post in a file like auth.php
__________________
X-Cart 4.0.5
MySQL: 3.23.58
PHP 4.3.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:30 AM.

   

 
X-Cart forums © 2001-2020