Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Undefined index: message_total this error is occuring in php

Avatar of shruti A
shruti A asked on
PHP
3 Comments1 Solution131 ViewsLast Modified:
$sql1="select a.message_total,b.message_sent from 
( SELECT 
batch_id, count(phone) message_total from to_numbers  group by batch_id
 ) a left outer join
  ( SELECT 
batch_id, count(phone) message_sent from message_sent  group by batch_id
   ) b
   on a.batch_id=b.batch_id 
   where a.batch_id=".$max_id."";

$out = '';  

      $result1 = mysqli_query($db, $sql1);
      
      while($row = mysqli_fetch_row($result1))  
      {  
         
        $out .='<table class="table table-bordered"><tr><td width="30%"><label>message_total</label></td><td width="70%">'.$row['message_total'].'</td></tr><tr><td width="30%"><label>message_sent</label></td><td width="70%">'.$row['message_sent'].'</td></tr></table>';  
      }  

the below error is coming

"
\nNotice: Undefined index: message_total in C:\\xampp\\htdocs\\whatsapp_message_sender\\importData.php on line 256
\n
\nNotice: Undefined index: message_sent in C:\\xampp\\htdocs\\whatsapp_message_sender\\importData.php on line 256
\n<table class="table table-bordered"><tr><td width="30%"><label>message_total</label></td><td width="70%"></td></tr><tr><td width="30%"><label>message_sent</label></td><td width="70%"></td></tr></table> success "

please let me know the solution
SOLUTION
Avatar of Vel Eous
Vel EousResearch & Development Manager

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answers