Hi girls and boys.
I am using php5 and MySQL5 and I have set up a table called stats with an id code month and year.
I am using php 5 and MySQL 5. The idea is to set up stats for customers to see how many times the individuals article has been visited each month. When the page is visited It puts into a table called stats with the id code month and year. I have a chart script but I am having problems with the following script. When I put the following script it works fine.
$link = mysql_connect("mysqlblah", "blah", "blah") or die (mysql_error());
mysql_select_db("blah", $link);
$result = mysql_query("SELECT * FROM `customers`WHERE `sid` = '$sid'", $link);
$num_rows1 = mysql_num_rows($result);
echo "$num_rows1";
But when I add the following code nothing happens.
$result = mysql_query("SELECT * FROM `customers`WHERE `sid` = '$sid'And `month` = '$m' And `year` = '$y'", $link);
$num_rows1 = mysql_num_rows($result);
I am trying to count the number of times an individual advert has been visited for each month of the year only for each individual customer.
I hope someone can help but if not have a great day any way.