need help Updating table info from any array
Posted: Fri Aug 08, 2003 5:19 pm
I am getting the values from a check box and go through a loop to get the values ' 1 ',' 2 ',' 3 '.
what I am wanting to do is replace the existing values with the new ones
i bring in with the array. so for example I had
AgencyID_____ServiceID
1 ____________1
1 ____________ 2
I would Like it to change to
AgencyID_____ServiceID
1 ____________1
1 ___________ 2
1 ____________3
here is my sql query
Any help would be great!!! Thanks
what I am wanting to do is replace the existing values with the new ones
i bring in with the array. so for example I had
AgencyID_____ServiceID
1 ____________1
1 ____________ 2
I would Like it to change to
AgencyID_____ServiceID
1 ____________1
1 ___________ 2
1 ____________3
here is my sql query
Code: Select all
<?php
UPDATE AgencyServices ags
INNER JOIN AgencyServices ON (ag.AgencyID = ags.AgencyID)
INNER JOIN Services s ON (ags.ServiceID = s.ServiceID)
INNER JOIN UserLogin ul ON (ag.AgencyID = ul.AgencyID)
SET ags.ServiceID IN (' 1 ',' 2 ',' 3 ' ) // i think thats my problem
WHERE ul.UserName ='blah'
AND ul.Password ='blah'
?>