How to merge these two cycles into one cycle



  • How to merge these two cycles into one cycle

    $result = mysql_query("SELECT name, surname, class_str, class_int, id_school  FROM datacenter WHERE surname = '$surname_parent' AND type = 'scholar' AND id_school IN                 ('$id_school', '$id_school1')");
    while ($row = mysql_fetch_array($result))
    {
        echo '<p>';
        echo $row[0].' '.$row[1];
        echo'</br>';
        echo $row[2]. '-' . $row[3];
        echo'</br>';
        echo'</p>';
    }
    mysql_query("INSERT INTO helpschool (id_school, name) VALUES ('$id_school', '$name_parent')");
    $da = mysql_query('SELECT `school` . `school`,  `street`, `city` FROM `helpschool`, `school` WHERE`helpschool` . `id_school` = `school` . `id_school` ');
    

    while( $row = mysql_fetch_array( $da ))
    {
    echo $row[2];
    echo '</br>';
    echo $row[1];
    echo '</br>';
    echo $row[0];
    }



  • You http://govnokod.ru/ = /users/4425/zow Don't you feel sorry? SQL and HTML in one file is murder. The answer to your question (if I understand correctly, you'd like to eat the results of these two selters): nothing. But if you're a sadomazo, you can see. http://php.net/manual/ru/function.array-merge.php




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2