getJSON variable return

getJSON variable return

Hello All,

If there is no data to return from the MySQL db I want to be able to return a var, noRecords, from my select.php page. Can anyone help?

  1. $.getJSON("select.php", function(data) {
  2. $.each(data, function(i, row){
  3. $.each(row, function(i, value){         
  4. });
  5. $('.main').append(
  6. 'html ouput'
  7. });      
  8. });

Thank you very much everyone! ;)