php - My system is fetching data from a wrong table -


Instead of receiving data from the DOC_PROGRESS table, it continues to retrieve data from

table I need data from both tables but I think I am doing it wrong. My query is down, by the way. Please help me
  (from the selection "dd as JOIN doc_progress AS dp ON dd.p_id = dp.p_id WHERE (dd.p_id = '". $ _ Session [' currentUser ']. "') And (dp.progress =' ​​read ')");   
  & lt ;? Php $ select1 = "doc_progress" as the ASD DP JOIN DOC DD ON dd.p_id = dp.p_id WHERE (dd.p_id = ''. $ _ Session ['current user']. "") And (dp .progress = 'unread'); $ Sql ​​= mysql_query ($ select1) or die (mysql_error ()); while ($ row2 = mysql_fetch_array ($ sql)) {? & Gt; & lt; tr square = " Strange Grade X ">   echo $ row2 ['date_created']? & Gt; & lt; / td> & lt; td & gt; & lt; a Href = "" & gt; & lt ;? php echo "& lt; B & gt; ". $ Line2 [[document_title ']." & Lt; / P & gt; ";? & Gt; & lt; / a & gt; & lt; / TD & gt; & lt; TD & gt; & lt ;? php echo $ row2 ['status']? & Gt ;  & lt; td & gt; & lt ;? php echo $ row2 ['progress'];? & Gt; & lt; / td> & lt; td & gt; & lt;    

Use it

  ("SELECT DD. *, DP. * DD inner join doc-progress DP on document. DD.p_id = DP.p_id where DD.p_id = '". $ _ Session [' Current User '].' 'And DP, Progress =' ​​Read '");    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -