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

JSON SORT WITH PHP
I have two products that I want to sort by say "Id:17, value: xxx" using php
The page w

Image loading
Hi Developers,

I'm trying to display an image from images/image.gif getting the url from mysq

$_POST
Hi, I have 2 seperate php files, and i want my $_POSt["fname"] To go into both of them, Fo

Best way to check for end of a record and send it back to the first record
I'm hoping someone can help me out and explain the best way to accomplish this.

What I'm doin

Printing a webpage
I use this to print the webpage: o

weeks in a year
hi,

i found this snippet on php.net
QuoteFor the week number for weeks starting on Sunday:

How to load mysql (and other) extensions into PHP
How to load mysql (and other) extensions into PHP PHP Development forum discussing coding practices,

form help
this doesn't work. i want the form action to go the location.href of the submit button chosen.. how

Xacute search within SQL results
I have a query that is pulling data, and I want to return a specific value from the results of that

dinamic "textboxes"?
Ey all, my first post here, i hope its not a hard one

I display mysql results in a table

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