I have 2 tables, Table A:
sid, phone, ts
And Table B:
id, phone, sid(NULL), ts
I have written a PHP script to connect, query and read in the data, but am not sure how to edit the data.
What I essentially want to do is match tableB phone
with tableA phone
and if match then update tableB column sid
which is NULL
with tableA sid
.
I am sure this can be done with while
and foreach
loop but am not exactly sure how.
Can anyone please help?