Note that there are some explanatory texts on larger screens.

plurals
  1. PODiaplay posts using Sql sub query
    primarykey
    data
    text
    <p>I am building a small social network for my department.</p> <p>I have the homepage as a place where you can make comments and your friends can comment on it.</p> <p>I have <strong>4 tables</strong> ...allposts_tb, friendship_tb,response_tb and signup_tb..</p> <p>The <strong>allposts_tb</strong> collect the updates and post made by people it has the following columns (<code>all_id(PK)</code>,<code>name</code>,<code>comment</code>,<code>time</code>) </p> <p>The <strong>friendship</strong>_tb as the columns (<code>friend_id(Pk)</code>,<code>myname</code>,<code>newfriend</code>,<code>status</code>)</p> <p>The <strong>response_tb</strong> as columns(<code>id(Pk)</code>,<code>name</code>,<code>response</code>,<code>all_id(Fk)</code>,<code>time</code>)</p> <p>The <strong>signup_tb</strong> as columns (<code>signup_id</code>,<code>lastname</code>,<code>firstname</code>,<code>email</code>,<code>password</code>,<code>country</code>,<code>profilepicture</code>)</p> <p>I can display comments made by people easily using the sql query below</p> <pre><code> SELECT allposts_tb.all_id,allposts_tb.name,allposts_tb.comment, allposts_tb.time, friendship_tb.myname,friendship_tb.newfriend,signup_tb.firstname, signup_tb.lastname,signup_tb.email,signup_tb.profilepicture, allposts_tb.expand FROM allposts_tb,friendship_tb,signup_tb WHERE allposts_tb.name = friendship_tb.newfriend and friendship_tb.myname=colname and allposts_tb.name=signup_tb.email ORDER BY allposts_tb.all_id DESC and colname=$_SESSION['MM_Username'] </code></pre> <p>Well am having problems displaying responses made by people on a particular comment right below the comment...just like replicating facebook's page.Immediately you say something,it should be displayed right below the comment... I know am meant to use a sub query. right inside the query i gave you guys..have read a lot of web pages but cant get it to work...please help me...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload