Jump to content

Efrem

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

About Efrem

  • Birthday 05/18/1991

Profile Information

  • Gender
    Male
  • Location
    In A Hole

Efrem's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Oh right right, i forgot about that, i had changed it before in the db but forgot about the query. Thanks! - Efrem
  2. function getNewMailAmt($uid) { global $database; $q = "SELECT * FROM privmsgs WHERE user_to='$uid' AND read='0'"; $r = mysql_query($q, $database->connection); return mysql_numrows($r); } Mmmk for the query i can do just $q = "SELECT * FROM privmsgs WHERE user_to='$uid'"; And it will work just fine, but when I add the AND, which i really need, it wont work. Any ideas? Also.. There are 3 rows in the DB that this should correspond with.
  3. .opaque { opacity: 0.4; filter: alpha(opacity=40); } Mmk... So basically i put this in to make the word "Offline" a bit transparent. Now it works fine in FF but not IE, when it really should considering i put filter: alpha.. in there.. Is there another way to do this in IE?
  4. Awesome . Works perfectly! Thank you very much guys.
  5. Well I dont have the Cap Field created as i want it to be dynamic without having to do much work. So ill rephrase the question.. i want to do something like this: if (turns + 10 >= level * 100) THEN SET turns = level*100 ELSE SET turns = turns +10 now i know you can use IF Else statements in sql commands.. but i have no idea how to do it correctly - efrem
  6. Ok i got it to work. But now here is 1 last question. Lets say i wanted to add a Cap to it like... Turns cant be more than Level * 100... how would i go about doing that?.. like lets say if.. Person X | Turns = 321 | Level = 4 | Cap Turns = 400 Person Y | Turns = 192 | Level = 2 | Cap Turns = 200 Now with the Cron it will constantly add 10 Turns every 10 Mins. How would i make it so that it just equals the Cap if its gonna go over it? Cap Turns Is Not a value in my Table. - Efrem
  7. I put my email into the cron job editor feature on my host, got this error: Enter password: ERROR 1045 (28000): Access denied for user 'my_user'@'localhost' (using password: NO) This is my Cron Command: mysql -h localhost -u my_user -p my_password -e "UPDATE chivalry_rpg.characters SET turns = turns + 10" @mmarif4u 1. I dont have linux 2. Not entirely sure if my host has Linux installed? I can run the Cron Job though it just shoots that error at me ^ 3. On my host 4. Yes
  8. Mmmk ty. Another question mysql -h hostname -u username -p password -e "update mytable set status = archive where status = filed" I have to double check that command line for Cron ^ Uhh now if that is correct how would i go about doing addition in that command line.. like... 100 Users Every 10 Mins i want to add 10 turns to all of them. I dont know Cron Job but google helped me out a bit, but not enough. - Efrem Edit - I was trying things in my phpmyadmin.. so far i have this UPDATE turns SET turns = turns + 10 FROM chivalry_rpg.characters WHERE turns >= 0 but it doesnt work for whatever reason, tried it like this too UPDATE turns SET turns = turns + 10 FROM chivalry_rpg.characters Ok i got it working, gonna try the cron command now
  9. Ok well I took on a project, for learning purposes, to make a Text-Based RPG Game. So far I have the database completely setup and everything is working fine. But what I am searching for is how to update a value in a MySql DB every x amount of minutes. Now whether this is a Php question or a Sql question stumped me, because I just have no idea how I would do it, so I posted it here. Any help is appreciated! Thanks in advance. - Efrem
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.