dimanche 30 septembre 2018

PHP Script stops running

When an answer is found in stage 3, the script stops running and does not proceed to the rest of the stages.The code should find an answer on the MYSQL server and cross-reference the answers, this section should find the search results.The positive part of the code is provided throughout the post. The code has 3 identical sections that search other tables on the server. When an answer is found, it appears that the code stops (a response is returned from the function) and does not execute the rest of the code (additional 2 extension functions continue later in the script)

if ($table=="cemetery")
                            {
                            $sql_search_fields_Cem[] = $colum." like '%$word%'";
                            $sql_search1="select cemetery_id from cemetery where  ";
                            $sql_search1.=implode(" OR ",$sql_search_fields_Cem);
                            $sql_search1.=implode (" ;");

                            $result3=$conn -> query($sql_search1);
                            if ($result3 -> num_rows >0)
                            {
                                while ($r3=$result3 -> fetch_assoc())
                                {
                                    if (resultIsExists($r4['update_date'] , $table))
                                    {
                                      echo "<br> return from func RIE <br>";
                                    }
                                }
                            }
                            else
                            {
                              echo mysqli_error ($conn). " No search results found for cemetery /r/n ";
                            }




Aucun commentaire:

Enregistrer un commentaire