I need a way through any language mysql, php, ect. to manually update a mysql database with a number of users based on a condition.
–My problem is I’m running a sports picks website and I need an easier way to update scores based on the picks users make–
–The way I do it now is through php and the user has to log in to trigger the function. i need a way to do it manually and effect all users–
MySQL’s
UPDATEcan affect one or many rows depending on the conditions you set. So, if you want something that can be handled with a simple update or a complex one, you can either write that update (that affects all users) as a stored procedure and have the site automatically execute it either manually (so every user can trigger it but affect all users) or automatically (every time a user logins or logoffs or every 1000 clicks or whatever works best and does not runs the update millions of times every minute).Or set up the site pages so only certain users (like only you, the Admin or a few more) can trigger the update manually, whenever they like.
In short, you don’t need a cron job really (although you can use one if you are more familiar with those.)