Jump to content

SELECT COUNT(*) Suddenly Stopped Working - I Have NO Idea Why!


sintax63

Recommended Posts

I have this mysql_query in a good portion of my pages that counts to see how many states a user has been in by comparing entries from three separate tables. It has been working just fine until this morning when I pulled up the site to do some work on it.

 

If anyone can offer some suggestions I would be greatly appreciative!

 

$AL = mysql_result(mysql_query("SELECT COUNT(*) FROM users, tracking, profiles WHERE tracking.placeID = profiles.id AND tracking.userID = users.id AND tracking.userID = '$profileID' AND state='AL'"),0);

 

the $profileID does return a valid variable so I know that isn't the issue.  :shrug:

Link to comment
Share on other sites

Well after countless rewrites I got it working again. I am not sure why it worked all this time and then just stopped this morning. Yeah, yeah... I know it doesn't happen like that.  :P

 

$AL = mysql_result(mysql_query("SELECT COUNT(*) FROM users, tracking, profiles WHERE users.id='$profileID' AND tracking.userID='$profileID' AND profiles.id=tracking.placeID AND profiles.state='AK'"),0);

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.