#1
  1. No Profile Picture
    Nightwork
    Guest
    Devshed Newbie (0 - 499 posts)
    I just simply want to count a table and print the result but I just can't do the trick. I came up with something like this, but where did I go wrong:

    mysql_connect (localhost, x, x)or die ("Can't connect to SQL server !");
    mysql_select_db (x);

    $result = mysql_query ("SELECT count(*) FROM users");
    $result = $count

    and somewhere else: <? print $count ?>

    Help me plse, thankyouverymuch
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    $result=$count????


    try:

    list($count)=mysql_fetch_row($result);
  4. #3
  5. No Profile Picture
    Nightwork
    Guest
    Devshed Newbie (0 - 499 posts)
    Thanks a lot !!!

Similar Threads

  1. Look 'n' feel based on refferer ID
    By spacer in forum PHP Development
    Replies: 6
    Last Post: September 10th, 2003, 01:23 PM
  2. Laws for stupid people
    By AGibel in forum Dev Shed Lounge
    Replies: 1
    Last Post: July 8th, 2003, 08:20 PM
  3. I don't get it and I feel stupid!
    By popstalin in forum PHP Development
    Replies: 8
    Last Post: March 4th, 2003, 08:51 PM
  4. stupid question: what field type for storing sex?
    By .shapeShifter in forum MySQL Help
    Replies: 6
    Last Post: January 16th, 2003, 05:11 AM
  5. help with stupid popup windows
    By randor in forum Windows Help
    Replies: 1
    Last Post: September 29th, 2002, 11:38 AM

IMN logo majestic logo threadwatch logo seochat tools logo