Apply inner join to fetch data from a single table

This is my table structure, and my aim is to fetch data from the single table in parent -> child -> parent manner

MY Query —-

And Finally, my RESULT —

Advertisements

System.out.print in php

System.out.print is totally valid in php likewise in JAVA. I ran this sample code and its working all fine in PHP 5.3.

$result = 5;
System.out.print(“This is a valid System.out.print with uppercase S”);
System.out.print(“<br>”);
system.out.print(“This is a valid system.out.print with lowercase s”);
System.out.print(“<br>”);
System.out.print($result);

How to remove suckerfish JS error

Add this line of code to suckerfish.js file

 

if (document.getElementById("nav") == null) return;

It looks like —

sfHover=function(){
if (document.getElementById("nav") == null) return;
var sfEls=document.getElementById("nav").getElementsByTagName("LI");
for(var i=0;i<sfEls.length;i++){
sfEls[i].onmouseover=function(){
this.className+=" sfhover"}
sfEls[i].onmouseout=function(){
this.className=this.className.replace(new RegExp(" sfhover\\b"),"");}
}
}
if(window.attachEvent)window.attachEvent("onload",sfHover);

How to apply two inner joins within a single query

This is the query i run to fetch data from multiple tables —

SELECT qtq.c_ques_cat AS q_cat, qtq.c_point AS fuly_score, SUM( qrs.c_score ) AS us_score, L.qc_category AS q_category
FROM jos_quiz_r_student_question AS qrs
INNER JOIN jos_quiz_t_question AS qtq ON qrs.c_question_id = qtq.c_id
INNER JOIN jos_quiz_q_cat AS L ON L.qc_id = qtq.c_ques_cat
AND qrs.c_stu_quiz_id = '784'
AND qtq.published =1
GROUP BY q_cat
ORDER BY us_score
LIMIT 0 , 30