adzie Posted July 20, 2008 Share Posted July 20, 2008 Hello, I have this script which updates a field based on a time difference but i'd also like to update another table at the same time/ this is the current status if (($status == "7") && ($tdiff > 70)) { $query_status = "UPDATE member SET active = 4 WHERE member_num='$num'"; $result_status = mysql_query($query_status); } i'd also like to update this INSERT INTO member_records (member_num, type, previous, new, user) VALUES ('$num','3','1','4','SYSTEM')"; Any pointers or tips for the best results? cheers Link to comment https://forums.phpfreaks.com/topic/115718-solved-mutiple-table-updates/ Share on other sites More sharing options...
trq Posted July 20, 2008 Share Posted July 20, 2008 Add your second query under the other. Link to comment https://forums.phpfreaks.com/topic/115718-solved-mutiple-table-updates/#findComment-594923 Share on other sites More sharing options...
adzie Posted July 20, 2008 Author Share Posted July 20, 2008 Thats exactly what I did, and no joy hence my request to see if I was doing something wrong!. Link to comment https://forums.phpfreaks.com/topic/115718-solved-mutiple-table-updates/#findComment-594926 Share on other sites More sharing options...
adzie Posted July 20, 2008 Author Share Posted July 20, 2008 resolved, thanks for your help Link to comment https://forums.phpfreaks.com/topic/115718-solved-mutiple-table-updates/#findComment-594928 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.