<?php include('top.php'); ?> <form action="index.php" method="POST"> <input type="hidden" name="pokaz" value="plik"> <select MULTIPLE size="25"> <?php $nazwa = $_POST['szukaj']; { require_once("../config.php"); if($n > 0) { if($zapytanie_1==true) { { $firstname = $rekord['firstname']; $lastname = $rekord['lastname']; $username = $rekord['username']; $userid = $rekord['id']; $department = $rekord['department']; } }} else { } } else { } { $_POST['contextid']=konwertuj($_POST['contextid']); $blad=''; if ($blad!='') info($blad,'blad'); else { mysql_query("INSERT INTO `mdl_role_assignments` (`roleid`,`contextid`,`userid`,`hidden`,`timestart`,`timeend`,`timemodified`
,`modifierid`,`enrol`,`sortorder`) info('Dane zostały dodane.','ok'); include('plik.php'); return; } } else { $_POST['contextid']=''; } ?> </select><br><br> <input size="5" type="text" name="contextid" value="<?php echo $_POST['contextid']; ?>">Podaj CONTEXTID<br> <input type="submit" value="PRZYPISZ"> </form> <?php include('bottom.php'); ?>
Gdzie jest babol? Nie dostaję żadnego błędu.
Zastrzyk do bazy spod MySQL Query Browser działa poprawnie
INSERT INTO `mdl_role_assignments` (`roleid`,`contextid`,`userid`,`hidden`,`timestart`,`timeend`,`timemodified`,`modifierid`,`enrol`,`sortorder`) SELECT 5,45, id, 0, 1270759517, 0, 1270759517, 2, 'manual', 0 FROM mdl_user WHERE department LIKE 'sem2'
Proszę o pomoc w zintegrowaniu tego z PHP