Here is a similar structure of a table that I am working on.
|--ID--|--user_id--|--meta_key---|--meta_value--|
|--1 --|--444444---|--first_name-|------NULL----|
|--2 --|--444444---|--last_name--|------NULL----|
|--3 --|--444444---|--phonenum---|------NULL----|
|--4 --|--333333---|--first_name-|------NULL----|
|--5 --|--333333---|--first_name-|------NULL----|
|--6 --|--333333---|--phonenum---|------NULL----|
|--7 --|--222222---|--first_name-|------NULL----|
|--8 --|--222222---|--first_name-|------NULL----|
|--9 --|--222222---|--phonenum---|------NULL----|
I am trying to UPDATE all the info for a given user. Let's say I want to update the first_name, last_name, and phonenum for the user with user_id 333333 in a single query using mysqli.
This is not a wordpress database, so please do not include native wordpress functions in the answer.
Aucun commentaire:
Enregistrer un commentaire