Search found 5 matches

by chicago123
Tue Mar 11, 2014 1:12 am
Forum: Databases
Topic: How do I reset a column in my database every x days?
Replies: 3
Views: 4937

How do I reset a column in my database every x days?

I am a PHP beginner. Every x days (every 7 days for example), I would like all the values in a certain column in my MySQL database to reset back to '1'. How do I do this? Please note: My web host does NOT have the MySQL event scheduler enabled so that is not an option. Also, my web hosting plan does...
by chicago123
Sun Mar 09, 2014 1:03 pm
Forum: PHP - Code
Topic: Not sure what is wrong with these IF statements
Replies: 5
Views: 1107

Re: Not sure what is wrong with these IF statements

Thanks for your replies.

The problem was that I had define $qotw further down the page AFTER these statements. I realized that I had to define it BEFORE these statements and now it is working fine.

Thanks!
by chicago123
Sat Mar 08, 2014 11:10 pm
Forum: PHP - Code
Topic: Not sure what is wrong with these IF statements
Replies: 5
Views: 1107

Re: Not sure what is wrong with these IF statements

Thank you for your reply.
Yes, I know they can't execute at the same time.
But now after I changed both of them to if($qotw == '1') and if($qotw == '2') neither of them execute when $qotw is equal to 1 or 2.

Thanks
by chicago123
Sat Mar 08, 2014 10:46 pm
Forum: PHP - Code
Topic: Not sure what is wrong with these IF statements
Replies: 5
Views: 1107

Not sure what is wrong with these IF statements

I'm a PHP beginner - I'm not sure what is wrong with this code. When $qotw is equal to 1, the 'cash' is increasing as its supposed to. However, when $qotw is equal to 2, the 'cash' value is still increasing and the message that should be displayed according to the 2nd IF statement is not showing up....