get a field from sql by another field

Really new here hope this platform can help me..

im trying to build a plugin for wordpress and im in my early stages testing it before closing it into a plugin..

i have a table with 3 collumns,
post_id, taxonomy1, taxonomy2.

the taxonomies can be only a number between 1 and 3 (can be 0 but not likely)

in addition to that, i have a cookie stored somewhere with another value..

i need to write a function, that returns the post_id of the post in the row where taxonomy1 is equal to tax1 in the cookie, and taxonomy2 is tax2 in the cookie +1…

for example my cookies are 1 and 2.

i need to find the first row in the table, that the tax1 = 1, and the tax2 is = 3…

i think that should be really simple but i dont know how even to search for this…

Read more here: get a field from sql by another field

Leave a Reply

Your email address will not be published. Required fields are marked *