0

i have two node.js application one is hosted on Heroku and the other is hosted locally, both are connected to the same database hosted on heroku clearDB extension. however , im getting different records when i fetch some data . but not competently, when i add a new record it's retrieved correctly by both application.

code on both environments(local,heroku server):

function getAppointments(user,callback){
 var sql = 'SELECT * FROM appointments_3sd3df WHERE clinic_id = ?';
 pool.query(sql,[user.clinic_id], function(error, results){
  if (error) throw error;
  console.log(results);
  callback(results);
 });
}

left data on Heroku server right is local server

othman A
  • 3
  • 2
  • 1
    Could you, please show how you fetch the data and what kind of responses you get? – Artem K May 31 '19 at 19:49
  • 1
    @ArtemK i added the code thx – othman A May 31 '19 at 20:09
  • Could you, please `SELECT * FROM appointments_3sd3df WHERE clinic_id = ? ORDER BY appointment_time` to easily see the differences in returned data? (or whatever your `appointment_time` column is called). – Artem K May 31 '19 at 23:15

0 Answers0