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

php/mysql problem
Hey all,

Problem: im trying to setup a shop where people can use a drop-down list to select t

Delete all from a table
I can not get the following code to work. If I run the sql statement in the db it will delete all t

Using mysql_real_escape_string for displayed content
On my website users can input data into a textarea and it will store it in the mysql database. But,

Passing variables with pagination - iterating through unique id per link
Hi everyone,
I have seen a few topics like this one. Still cant find the specific thing, so I am

error reporting
hey everyone

I have a production server in which I want error reporting but only on some page

LIMIT $start, 10... how to pass last value queried into next page with GET??
Ok I know how to display the first or last 10 results of a query...

$result = mysql_query(&q

filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I h

bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error

Weird Problem with curl while sending data
I am facing a weird problem with sending data to a site via curl.

If i send the value by this

displaying unknown amount of results
I am reading a directory and getting a list of folders in the directory, I want to display the folde

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