In MySQL, I am using the following three tables (their fields are listed after their headings):
Note:
commentid loginid deposit datecommented
login:
loginid user name password e-mail actcode Disabled active digit
Submissions:
Subdivided loginhead title URL Displacement dates permit
I "dated" And "a given" user The comment for "am", "where" username "is equal to one variable named http: // Www ... com /.../ comments / index.php? Submission = '. $ Rowc ["title"].' & Raquo;; '$ rowc ["submid"].' Submid = & amp; url = & amp; $ 'rowc ["url"] ..'; countcomments = '. $ Rowc ["countComments"].' & Amp; submittor = '. $ Rowc ["Username"]. Amp; Submit ='. $ Line [["datesubmitted"]. ' & Amp; dispurl = '. $ Rowc ["displayurl"].'
where the countcomments are equal COUNT (C.commentid)
and $ rowc
are part of the query given below.
I gave the following What I wanted to do to use the code, but it did not work.
John
$ sqlStrc = "SELECT s.loginid How can I do this? ? , S.title, s.url, s.displayurl, s.datesubmitted, l.username, l.loginid, s.title, s.submissionid, c.comment, c.datecommented, COUNT (c.commentid) presenting numbers From Conferences S INNER Login Login on L. s.loginid = l.loginid LEFT OUTER JOIN comment on c.loginid = l.loginid WHERE l.username = '$ profile' group c.loginid by ORDER s.datecommented DESC LIMIT 10 "; $ Resultc = mysql_query ($ sqlStrc); $ Arrc = array (); echo" & lt; $ Class = \ "samplesrec1c \" & gt; "; while ($ rowc = mysql_fetch_array ($ resultc)) {$ dtc = new date time ($ rowc [" datecommented "], $ tzFromc); $ dtc- & gt; setTimezone ($ TzToc); Echo '& lt; tr & gt;'; ANCO '' td class = "sitename3c" & gt; $ .dtc-> Format ('fj, y and amp \ nb \ sp & amp; \ nb \ sp g: i a'). & Lt; / a & gt; & lt; / td & gt; '; Echo & lt; td class = "sitename1c" & gt; & lt; a href = "http: //www...com/.../comments/index.php?submission ='. $ Line ["title"] '& amp; Submid = '$ rowc ["submid"]' & amp; Url = '.. $ Rowc ["url"] '& amp; Countcomments = '... $ Rowc ["countComments"] '& amp ;. Submittor = '. $ Rowc ["username"]. ' & Amp; Submissiondate = & amp; $ rowc ["datesubmitted"] .. '; '' $ Stringc ["DisplayURL"] .. ';' stripslashes ($ rowc ["comment"]). '& Lt; / a & gt; & lt; / td & gt;'; echo & Lt; / tr & gt; ";} resonates" & lt; / Table & gt; ";
Do you show the last 10 comments from some users In that case, drop c.loginid by group
section where your section has already selected the comment from that specific user group will try to collect them in a row, gross and Expanded values such as s.url do not mix.
Comments
Post a Comment