I have a counter on my site that tracks hits, IP's, etc. into a mySQL database. It also includes the date in the entry. The code I'm using, that's not working, to try and retrieve the amount of hits in the last 7 days is:
$hitsWeek = mysql_result(mysql_query("SELECT SUM(`hits`) FROM `stats` WHERE `date` > '$time-604800' GROUP BY `date`"),0);
However, I'm getting this error: Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 10 in /var/www/main.php on line 50
Can anybody help me out with this?
problem with sql querry in php script
Hello guys, What I want to do is I want to read out a csv file and then but te conent ot the file in a msql datbase . So far it works but the problem I haven that if I want to let te script to the
php wont update my db
hello,sorry for posting in mysql forum but i dont know where exactly is the problem but here is the linkhttp://www.phpfreaks.com/forums/index.php/topic,272737.0.htm
Forms Authentication and Refresh at Login page
Hello,
echo $rows help
Hi all,Hopefully something simple that I don't know!I have this:Code: [Select]<div id="marquee"><?php$query = mysql_query("SELECT stock_id, stock_code, t_val, y_val
php mail form text wont appear / javascript included
Guys/gals...I am running into a problem whereby I have a great piece of javascript code that mimicks multi-page forms (see www.mtsgroup.co.uk/multiPageForm.htm).....The problem is the php file wont
FTP issues
Hi all,I am currently facing some serious problems with a script and really need some advise before I am actually sick To give you a brief overview of the situation, I have a script which is going to
please, need help coding this voting for your favorite car polling system.
hi, my code needs a lot of work, but i want to be able to let users vote on their favorite car, update the database, and display the new updated data for the top ten cars listed. i want to prevent
Ten Operator Syntax
Hi Guys,I can't figure out why i am getting a parse error with this basic ten op code:$prodTH = ($prodIA == "Y") ? "<img src=\"" . amazon_display_thumbnail($prodID)
single values into sql field
i have a form which i want the user to able to select multiple answers. But i want the answers to be stored into a single field on the mysql table in the back end. e.gthe user may select red + blue +
2 decima places & How to reload my page
Hello There,How do i put full-stop (.) after second figure from behind? ie if i have 123456 in my database and i want it to echo as 1234.56Secondly, am designing a shopping website. I want the pages