PHP code to update MySQL table

topgfx_com

New Member
I want to update a MySQL table with information from two other tables. I'll set up a cron job, but I don't know what PHP code to use.Every time the cron job runs, I want the 'VideoNumber' column from the 'Profiles' table to be updated with the amount of videos they've uploaded to the site. Video information is stored in a table called 'Videos', and each video has an 'OwnerID' to identify the user who uploaded it. This corresponds to the 'ID' column in the 'Profiles' table.I also wanted the 'PhotoNumber' column in the 'Profiles' table to be updated with the amount of photos the same user has uploaded - photo data is stored in the 'Photos' column.Can anybody help?
 
Back
Top