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:

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);

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.