execute($sql); if ($db->Affected_Rows() > 0) { echo "db_livetemps records updated successfully\n"; } else { echo "db_livetemps not updated\n"; }