Agree. It doesn't matter if your data is assigned with different id's since 2 columns lang naman sila. If your current table is connected to another table, change the fk value of that table to match with the dcode value pk to this table.Bakit kailangan mong pagpalitin yung dcode nila? Kung sa dalawang records lang naman na yan ang issue ay bakit hindi mo na lang i-edit at pagpalitin ang dcode nung dalawang row na yan?
Bakit kailangan mong pagpalitin yung dcode nila? Kung sa dalawang records lang naman na yan ang issue ay bakit hindi mo na lang i-edit at pagpalitin ang dcode nung dalawang row na yan?
Pasensya na po don't mind the first picture. Nakuha ko lang po yan sa internet.Agree. It doesn't matter if your data is assigned with different id's since 2 columns lang naman sila. If your current table is connected to another table, change the fk value of that table to match with the dcode value pk to this table.
painput mo muna yung dalawang magpapalit na id. Then kunin mo value ng device ids per id. Or pede mo rin painput directly yung device ids. Gamit ka update statement para maupdate ung row value.Pasensya na po don't mind the first picture. Nakuha ko lang po yan sa internet.
Eto po yung gagawin ko po talaga. Ang device po kasi ay pede po malipat sa ibang table kaya gagawa po sana ako ng switch function.
View attachment 1961516
Salamat po pede po ba dalawang query ang gawin sa update?dapat pag click ng switch makuha mo yung bagong kakalabasan
parang ganto
$id1 = $_POST['id1'];
$val1 = $_POST['val1'];
$id2 = $_POST['id2'];
$val2 = $_POST['val2'];
then perform ka ng update
UPDATE ..... Set value = =$val2 WHERE id = $id1
UPDATE ..... Set value = $val1 WHERE id = $id2
ang importante makuha mo mga need to perform the update
sana makatulong
mag kaibang query yanSalamat po pede po ba dalawang query ang gawin sa update?
Okay po try ko po mamayamag kaibang query yan
so parang 2 execute gagawin mo
mag kaibang query yan
so parang 2 execute gagawin mo
dalawang update queryOkay po try ko po mamaya
View attachment 1961741View attachment 1961765
Kapag ganito isang query lang po gagawin ko no?
Pede po ba yan kapag unique po sya. Bawal po pala magkatulad ng deviceID unique po dapat siladalawang update query