Generico Dataset Help with MySQL query

Re: Generico Dataset Help with MySQL query

by Justin Hunt -
Number of replies: 0
Picture of Particularly helpful Moodlers Picture of Plugin developers

Ron, 

If you are using an SQL count function, then it should return '0' if no records match your query. 

If you need to use branching logic, based on the results, eg 

if( @@DATASET:count@@ ==0){
  //do something
}else{
 //do something else
}

Then you should really use custom JS. It is possible to get clever with CSS and hide/show things depending on the value of a variable without JS. But customJS is going to be easier to maintain into the future and offers more advantages.