Count


Posted on 16th Feb 2014 07:03 pm by admin

Getting the same count everytime

Code:
$visitquery = mysql_query("SELECT COUNT(*) FROM visitors WHERE ownerkey = '$uuid' & region = '$selected' AND `date` < DATE_ADD(CURDATE(), INTERVAL +7 DAY)", $connect);
Did you know?Explore Trending and Topic pages for more stories like this.
$row9 = mysql_fetch_array($visitquery);
$visitoramount = $row9[0];
print "[$visitoramount] visits in the last 7 days!";
If $selected = "Blah" it gives the count as " 8"
if $selected = "Dumb" it gives the count as "8" ... Al though there is no "Dumb" in the db.

Sorry if my explaining is off. Just dont know another way to explain it easier.
No comments posted yet

Your Answer:

Login to answer
309 Like 18 Dislike
Previous forums Next forums
Other forums

Need help adding a timestamp to my filename/variable
Hello,

I'm kind of stupid when it comes to php and I need a tiny bit of help. I've got a f

Create a form of 2 numbers input and find the greatest.
Hi, everybody.

I have a homework in my training of php, which ask you to make a form that ask

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

Quick fix: Conditional statement with an array
Hi, I'm getting the temperature value off of the Environment Canada website along with the icon file

Better Method of a Member Cloud
I assume most people know how tag clouds work, where the tags most used are bigger and the least use

Error with login script
I am getting an error with my login script:

Error:
Code: Warning: Cannot modify header inf

how to put the 0-100 numbers into 1.txt and 100-200 into 2.txt ?
how to put the 0-100 numbers into 1.txt and 100-200 into 2.txt and so on 200-300 into file 3.txt ?

Are sessions secure at all?..
I haven't really gotten into yet, but I was just thinking of something weird..

Lets say you h

mysql_affected_rows() usage
Possibly a MySQL issue, but the function that is not behaving in the anticipated way is a PHP functi

need help in update query
i create a form for update. there are 8 columns in my mysql table. on my main page all the data is r

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash