Help with PHP MYSQL Select Statment -


I think how can I record the record when a user records multiple rows.

Here is the table schema.

  user_id key value -------------------------- ----------- ----- 1 Lesson This sample text is 1 text_status 0 2 text This sample text is 2 text_state1   

From the above table / row you can see that each user has multiple lines So how can I select this case "all id, text value where text_status is" 1 "?

And take it 1 step forward, I need an email address of accounts that are on the other table. I am also in the email address How can I write a selection statement for 1? I know that there is an assembly statement for this, but for me this is a bit complicated, especially I am unable to understand the first part.

Added note I must say that this table schema is a WordPress default table. Wp_usermeta ..

  SELECT t1. * Tbl t2 from INNER t1.user_id = t2.user_id and t1.key = 'text' pair on tbl t1. T2.key = 'text_status' and t2.value =' 1 '   

Comments