i run a phpbb system, i hve just migrated all of the data to a new server and database.
for some reason all user birthdays are now a day early!
not a problem i thought "i'll just write a simple script to add 1 to each db entry"
i figured (in rough code!!(cause its been a very long day!))
sql="SELECT `date` FROM users WHERE `user_id` = *"
$result = mysql_query($sql)
$row = mysql_fetch_array($result)
foreach ($row $user_id as &$date)
{
$date = $date++
sql="ALTER `date` to '$date' WHERE `user_id` = $user_id "
}
before getting as far as the foreach i tried the sql, and did a print_r() of the result but it only returned data for the first user
obviously my syntax in the first sql query is out, could someone please point me the right way!!
thanks
owaring