php - Error in mysql_fetch_array. Unable to fetch the records through while loop -


i trying fetch values of updated records dp. let me brief this-

1.i have 2 while loops ,one displaying records database , second fetched after edit operation.

2.after editing 1 of fields record should updated in database [i have updated record/records in db ] problem updating in database [ have checked db update record] records not displayed of updated records. think not enter while loop of update query.

please suggest solution.

if(isset($_post['recruiter_s_by_code']) {  //some code here...the query here being sucesss  //select statement here.. } if(isset($_post['recruiter_s_by_mail']) {  //some code here...the query here being sucesss  //select statement here.. } if(isset($_post['recruiter_s_by_name']) {  //some code here...the query here being sucesss  //select statement here.. }  if(isset($_post['recruiter_s_by_code']) || isset($_post['recruiter_s_by_name']) || isset($_post['recruiter_s_by_mail']))  {  $result=mysql_query($sql);  echo "in result"  while($row=mysql_fetch_array($result))  {     $viewrecruiter0=$row['recruiter_did'];     $viewrecruiter1=$row['recruiter_name'];     $viewrecruiter2=$row['recruiter_mail'];   }   }   else  {     if(isset($_get['var']))     {       $id1=$_get['var'];       echo $id1;     }     //$query1=update .......set......where...   ->the update success me. $res=mysql_query($query1); while($row=mysql_fetch_array($res))  {         $viewrecruiter00=$row['recruiter_did']; //by code  $viewrecruiter01=$row['recruiter_name'];  $viewrecruiter02=$row['recruiter_mail']; } } ?> 

the query of update running records not displayed after update click. label being displayed not values.

it sounds editing/updating 1 record @ time execute update run select on same record.

//$query1=update .......set......where...   ->the update success me. $res=mysql_query($query1); //$query1='select yada yada yada table same conditions'; $res=mysql_query($query1); while($row=mysql_fetch_array($res)) { 

if $id1 being used in query needs @ minimum put mysql_real_escape_string. i'm unclear mean when saying i have anothere backup have used mysqli should use mysqli on mysql_ whenever possible.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -