MYSQL Update command over php











up vote
-1
down vote

favorite












I am doing my first php project and it's now getting for me little uncomfortable.
I want to update datasets in my database but when i execute the code nothing happens. First I tried to upload and refresh the site with:




header("location: Erfassen_Server.php");




Than i saw this Warning (The line 1029 is the line with header "location: Erfassen_Server.php" and the line 416 is just a row wich really not can be the source of the problem):




Cannot modify header information - headers already sent by (output
started at C:xampphtdocssystemübersichtErfassen_Server.php:416) in
C:xampphtdocssystemübersichtErfassen_Server.php on line 1029




I have googled the reason, but could not found any useful information to solve the problem. So i had the idea to change the refresh part of the script to another code witch does the same:



$secondsWait = 0;    echo '<meta http-equiv="refresh" content="'.$secondsWait.'">';


Now everything looks good in php, i have no more error messages, but the datasets in my database are not updating. They do absolutely nothing. The site is refreshing with the not changed values.
I have checked my update sql command in the mysql web interface with fixed values instead of variables and there it is working. I have also checked if all the variables are working, and they have as value the ID's wich i need, therefor i would say this should be okay too.



Here is the SQL-Update statement:



UPDATE `system` Sys 
JOIN service ON service.Servicename_ID = Sys.FK_Service_ID
JOIN Hardware ON Sys.System_ID = Hardware.FK_System_ID
JOIN Verantwortlichkeit ON Sys.System_ID = Verantwortlichkeit.FK_System_ID
JOIN system_zertifikat ON system_zertifikat.Zertifikate_ID = sys.Zertifikat
JOIN hardware_servername ON hardware.Servername = hardware_servername.Servername_ID
JOIN hardware_domaene ON hardware_domaene.Domaene_ID = hardware.Domaene
JOIN hardware_betriebssystem ON hardware_betriebssystem.Betriebssystem_ID = hardware.Betriebssystem
JOIN hardware_standort ON hardware_standort.Standort_ID = hardware.Standort
JOIN verantwortlichkeit_personen AS AA ON AA.Verantwortlichkeit_Personen_ID = sys.Hersteller
JOIN verantwortlichkeit_personen AS AB ON AB.Verantwortlichkeit_Personen_ID = sys.Externer_Partner
JOIN system_verfuegbarkeitsstufe ON system_verfuegbarkeitsstufe.Verfuegbarkeitsstufe_ID = sys.Verfuegbarkeitsstufe
JOIN system_systemname ON system_systemname.Systemname_ID = sys.Systemname
JOIN system_systemnummer ON system_systemnummer.Systemnummer_ID = sys.Systemnummer
JOIN verantwortlichkeit_rolle ON verantwortlichkeit_rolle.Verantwortlichkeit_Rolle_ID = verantwortlichkeit.Rolle
JOIN verantwortlichkeit_personen AS A0 ON A0.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Hauptverantwortlicher
JOIN verantwortlichkeit_personen AS A1 ON A1.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Stellvertretung
JOIN verantwortlichkeit_personen AS A2 ON A2.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Wissenstraeger_1
JOIN verantwortlichkeit_personen AS A3 ON A3.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Wissenstraeger_2
JOIN verantwortlichkeit_personen AS A4 ON A4.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Verantwortlichkeit_extern


SET
Sys.Systemnummer = '$Systemnummer_ID',
Sys.Systembeschreibung = '$Systembeschreibung',
Sys.Hersteller = '$Hersteller_ID',
Sys.Externer_Partner = '$Externer_Partner_ID',
Sys.`BKAG_Brugg` = b'$BKAG_Brugg',
Sys.`BCIAG_Brugg` = b'$BCIAG_Brugg',
Sys.`Cables_Diverse_PL_CN_US_DE` = b'$Cables_Diverse',
Sys.`BINF` = b'$BINF',
Sys.`BRAG_Kleindoettingen` = b'$BRAG_Kleindoettingen',
Sys.`BRG_Wunstorf` = b'$BRG_Wunstorf',
Sys.`BGP_Nordhausen` = b'$BGP_Nordhausen',
Sys.`Pipes_Diverse_FR_PL_IT_US` = b'$Pipes_Diverse',
Sys.`Ropes_BDAG_Birr` = b'$Ropes_BDAG',
Sys.`HOLDING_Brugg` = b'$HOLDING_Brugg',
Sys.`BIAG_Brugg` = b'$BIAG_Brugg',
Sys.`BPK_Brugg` = b'$BPK_Brugg',
Sys.`Dritte_Schule_Brugg_LithCom_usw` = b'$Dritte',
Sys.`Verfuegbarkeitsstufe` = '$Verfuegbarkeitsstufe_ID',
Sys.`Datenverlust` = '$Datenverlust_ID',
Sys.`Systemname` = '$Systemname_ID',
Sys.`Zertifikat` = '$Zertifikat_ID',

hardware.`Servername` = '$Servername_ID',
hardware.`Domaene` = '$Domaene_ID',
hardware.`Betriebssystem` = '$Betriebssystem_ID',
hardware.`Lokale_Datenbank` = b'$Lokale_Datenbank',
hardware.`Datenbank_SQL_Master` = '$Datenbank_SQL_Master',
hardware.`Instanzname` = '$Instanzname',
hardware.`Standort` = '$Standort_ID',
hardware.`Backup_mit` = '$Backup_mit',


verantwortlichkeit.`Rolle` = '$Rolle_ID',
verantwortlichkeit.`Hauptverantwortlicher` = '$Hauptverantwortlicher_ID',
verantwortlichkeit.`Stellvertretung` = '$Stellvertretung_ID',
verantwortlichkeit.`Wissenstraeger_1` = '$Wissenstraeger_1_ID',
verantwortlichkeit.`Wissenstraeger_2` = '$Wissenstraeger_2_ID',
verantwortlichkeit.`Verantwortlichkeit_extern` = '$Verantwortlichkeit_Extern_ID'


WHERE Sys.System_ID = $System_ID"


I have spent really much time for finding the solution but can not find anything why it is not updating. Could it be that the new refresh solution has the same problem but is not giving any errors? Or am i overseeing something?



If someone could help me, i would be very thankful.



regards
okanog










share|improve this question


















  • 2




    You've posted a massive query with little explanation about what it does, or is supposed to be doing. Voting to close as too broad.
    – Tim Biegeleisen
    Nov 19 at 11:06










  • Hello @TimBiegeleisen I do not know what kind of extra information you are needing. The query should set a new value every time when I am updating the form, it should not matter if the value is changed to something else or it is still the same. The values from the database are showed as preselected default values on the php script. If you want to change the value, you can pick one from the linked listbox wich is dynamically listed from the values of tables in my database.
    – Okan OG
    Nov 19 at 12:24















up vote
-1
down vote

favorite












I am doing my first php project and it's now getting for me little uncomfortable.
I want to update datasets in my database but when i execute the code nothing happens. First I tried to upload and refresh the site with:




header("location: Erfassen_Server.php");




Than i saw this Warning (The line 1029 is the line with header "location: Erfassen_Server.php" and the line 416 is just a row wich really not can be the source of the problem):




Cannot modify header information - headers already sent by (output
started at C:xampphtdocssystemübersichtErfassen_Server.php:416) in
C:xampphtdocssystemübersichtErfassen_Server.php on line 1029




I have googled the reason, but could not found any useful information to solve the problem. So i had the idea to change the refresh part of the script to another code witch does the same:



$secondsWait = 0;    echo '<meta http-equiv="refresh" content="'.$secondsWait.'">';


Now everything looks good in php, i have no more error messages, but the datasets in my database are not updating. They do absolutely nothing. The site is refreshing with the not changed values.
I have checked my update sql command in the mysql web interface with fixed values instead of variables and there it is working. I have also checked if all the variables are working, and they have as value the ID's wich i need, therefor i would say this should be okay too.



Here is the SQL-Update statement:



UPDATE `system` Sys 
JOIN service ON service.Servicename_ID = Sys.FK_Service_ID
JOIN Hardware ON Sys.System_ID = Hardware.FK_System_ID
JOIN Verantwortlichkeit ON Sys.System_ID = Verantwortlichkeit.FK_System_ID
JOIN system_zertifikat ON system_zertifikat.Zertifikate_ID = sys.Zertifikat
JOIN hardware_servername ON hardware.Servername = hardware_servername.Servername_ID
JOIN hardware_domaene ON hardware_domaene.Domaene_ID = hardware.Domaene
JOIN hardware_betriebssystem ON hardware_betriebssystem.Betriebssystem_ID = hardware.Betriebssystem
JOIN hardware_standort ON hardware_standort.Standort_ID = hardware.Standort
JOIN verantwortlichkeit_personen AS AA ON AA.Verantwortlichkeit_Personen_ID = sys.Hersteller
JOIN verantwortlichkeit_personen AS AB ON AB.Verantwortlichkeit_Personen_ID = sys.Externer_Partner
JOIN system_verfuegbarkeitsstufe ON system_verfuegbarkeitsstufe.Verfuegbarkeitsstufe_ID = sys.Verfuegbarkeitsstufe
JOIN system_systemname ON system_systemname.Systemname_ID = sys.Systemname
JOIN system_systemnummer ON system_systemnummer.Systemnummer_ID = sys.Systemnummer
JOIN verantwortlichkeit_rolle ON verantwortlichkeit_rolle.Verantwortlichkeit_Rolle_ID = verantwortlichkeit.Rolle
JOIN verantwortlichkeit_personen AS A0 ON A0.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Hauptverantwortlicher
JOIN verantwortlichkeit_personen AS A1 ON A1.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Stellvertretung
JOIN verantwortlichkeit_personen AS A2 ON A2.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Wissenstraeger_1
JOIN verantwortlichkeit_personen AS A3 ON A3.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Wissenstraeger_2
JOIN verantwortlichkeit_personen AS A4 ON A4.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Verantwortlichkeit_extern


SET
Sys.Systemnummer = '$Systemnummer_ID',
Sys.Systembeschreibung = '$Systembeschreibung',
Sys.Hersteller = '$Hersteller_ID',
Sys.Externer_Partner = '$Externer_Partner_ID',
Sys.`BKAG_Brugg` = b'$BKAG_Brugg',
Sys.`BCIAG_Brugg` = b'$BCIAG_Brugg',
Sys.`Cables_Diverse_PL_CN_US_DE` = b'$Cables_Diverse',
Sys.`BINF` = b'$BINF',
Sys.`BRAG_Kleindoettingen` = b'$BRAG_Kleindoettingen',
Sys.`BRG_Wunstorf` = b'$BRG_Wunstorf',
Sys.`BGP_Nordhausen` = b'$BGP_Nordhausen',
Sys.`Pipes_Diverse_FR_PL_IT_US` = b'$Pipes_Diverse',
Sys.`Ropes_BDAG_Birr` = b'$Ropes_BDAG',
Sys.`HOLDING_Brugg` = b'$HOLDING_Brugg',
Sys.`BIAG_Brugg` = b'$BIAG_Brugg',
Sys.`BPK_Brugg` = b'$BPK_Brugg',
Sys.`Dritte_Schule_Brugg_LithCom_usw` = b'$Dritte',
Sys.`Verfuegbarkeitsstufe` = '$Verfuegbarkeitsstufe_ID',
Sys.`Datenverlust` = '$Datenverlust_ID',
Sys.`Systemname` = '$Systemname_ID',
Sys.`Zertifikat` = '$Zertifikat_ID',

hardware.`Servername` = '$Servername_ID',
hardware.`Domaene` = '$Domaene_ID',
hardware.`Betriebssystem` = '$Betriebssystem_ID',
hardware.`Lokale_Datenbank` = b'$Lokale_Datenbank',
hardware.`Datenbank_SQL_Master` = '$Datenbank_SQL_Master',
hardware.`Instanzname` = '$Instanzname',
hardware.`Standort` = '$Standort_ID',
hardware.`Backup_mit` = '$Backup_mit',


verantwortlichkeit.`Rolle` = '$Rolle_ID',
verantwortlichkeit.`Hauptverantwortlicher` = '$Hauptverantwortlicher_ID',
verantwortlichkeit.`Stellvertretung` = '$Stellvertretung_ID',
verantwortlichkeit.`Wissenstraeger_1` = '$Wissenstraeger_1_ID',
verantwortlichkeit.`Wissenstraeger_2` = '$Wissenstraeger_2_ID',
verantwortlichkeit.`Verantwortlichkeit_extern` = '$Verantwortlichkeit_Extern_ID'


WHERE Sys.System_ID = $System_ID"


I have spent really much time for finding the solution but can not find anything why it is not updating. Could it be that the new refresh solution has the same problem but is not giving any errors? Or am i overseeing something?



If someone could help me, i would be very thankful.



regards
okanog










share|improve this question


















  • 2




    You've posted a massive query with little explanation about what it does, or is supposed to be doing. Voting to close as too broad.
    – Tim Biegeleisen
    Nov 19 at 11:06










  • Hello @TimBiegeleisen I do not know what kind of extra information you are needing. The query should set a new value every time when I am updating the form, it should not matter if the value is changed to something else or it is still the same. The values from the database are showed as preselected default values on the php script. If you want to change the value, you can pick one from the linked listbox wich is dynamically listed from the values of tables in my database.
    – Okan OG
    Nov 19 at 12:24













up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I am doing my first php project and it's now getting for me little uncomfortable.
I want to update datasets in my database but when i execute the code nothing happens. First I tried to upload and refresh the site with:




header("location: Erfassen_Server.php");




Than i saw this Warning (The line 1029 is the line with header "location: Erfassen_Server.php" and the line 416 is just a row wich really not can be the source of the problem):




Cannot modify header information - headers already sent by (output
started at C:xampphtdocssystemübersichtErfassen_Server.php:416) in
C:xampphtdocssystemübersichtErfassen_Server.php on line 1029




I have googled the reason, but could not found any useful information to solve the problem. So i had the idea to change the refresh part of the script to another code witch does the same:



$secondsWait = 0;    echo '<meta http-equiv="refresh" content="'.$secondsWait.'">';


Now everything looks good in php, i have no more error messages, but the datasets in my database are not updating. They do absolutely nothing. The site is refreshing with the not changed values.
I have checked my update sql command in the mysql web interface with fixed values instead of variables and there it is working. I have also checked if all the variables are working, and they have as value the ID's wich i need, therefor i would say this should be okay too.



Here is the SQL-Update statement:



UPDATE `system` Sys 
JOIN service ON service.Servicename_ID = Sys.FK_Service_ID
JOIN Hardware ON Sys.System_ID = Hardware.FK_System_ID
JOIN Verantwortlichkeit ON Sys.System_ID = Verantwortlichkeit.FK_System_ID
JOIN system_zertifikat ON system_zertifikat.Zertifikate_ID = sys.Zertifikat
JOIN hardware_servername ON hardware.Servername = hardware_servername.Servername_ID
JOIN hardware_domaene ON hardware_domaene.Domaene_ID = hardware.Domaene
JOIN hardware_betriebssystem ON hardware_betriebssystem.Betriebssystem_ID = hardware.Betriebssystem
JOIN hardware_standort ON hardware_standort.Standort_ID = hardware.Standort
JOIN verantwortlichkeit_personen AS AA ON AA.Verantwortlichkeit_Personen_ID = sys.Hersteller
JOIN verantwortlichkeit_personen AS AB ON AB.Verantwortlichkeit_Personen_ID = sys.Externer_Partner
JOIN system_verfuegbarkeitsstufe ON system_verfuegbarkeitsstufe.Verfuegbarkeitsstufe_ID = sys.Verfuegbarkeitsstufe
JOIN system_systemname ON system_systemname.Systemname_ID = sys.Systemname
JOIN system_systemnummer ON system_systemnummer.Systemnummer_ID = sys.Systemnummer
JOIN verantwortlichkeit_rolle ON verantwortlichkeit_rolle.Verantwortlichkeit_Rolle_ID = verantwortlichkeit.Rolle
JOIN verantwortlichkeit_personen AS A0 ON A0.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Hauptverantwortlicher
JOIN verantwortlichkeit_personen AS A1 ON A1.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Stellvertretung
JOIN verantwortlichkeit_personen AS A2 ON A2.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Wissenstraeger_1
JOIN verantwortlichkeit_personen AS A3 ON A3.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Wissenstraeger_2
JOIN verantwortlichkeit_personen AS A4 ON A4.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Verantwortlichkeit_extern


SET
Sys.Systemnummer = '$Systemnummer_ID',
Sys.Systembeschreibung = '$Systembeschreibung',
Sys.Hersteller = '$Hersteller_ID',
Sys.Externer_Partner = '$Externer_Partner_ID',
Sys.`BKAG_Brugg` = b'$BKAG_Brugg',
Sys.`BCIAG_Brugg` = b'$BCIAG_Brugg',
Sys.`Cables_Diverse_PL_CN_US_DE` = b'$Cables_Diverse',
Sys.`BINF` = b'$BINF',
Sys.`BRAG_Kleindoettingen` = b'$BRAG_Kleindoettingen',
Sys.`BRG_Wunstorf` = b'$BRG_Wunstorf',
Sys.`BGP_Nordhausen` = b'$BGP_Nordhausen',
Sys.`Pipes_Diverse_FR_PL_IT_US` = b'$Pipes_Diverse',
Sys.`Ropes_BDAG_Birr` = b'$Ropes_BDAG',
Sys.`HOLDING_Brugg` = b'$HOLDING_Brugg',
Sys.`BIAG_Brugg` = b'$BIAG_Brugg',
Sys.`BPK_Brugg` = b'$BPK_Brugg',
Sys.`Dritte_Schule_Brugg_LithCom_usw` = b'$Dritte',
Sys.`Verfuegbarkeitsstufe` = '$Verfuegbarkeitsstufe_ID',
Sys.`Datenverlust` = '$Datenverlust_ID',
Sys.`Systemname` = '$Systemname_ID',
Sys.`Zertifikat` = '$Zertifikat_ID',

hardware.`Servername` = '$Servername_ID',
hardware.`Domaene` = '$Domaene_ID',
hardware.`Betriebssystem` = '$Betriebssystem_ID',
hardware.`Lokale_Datenbank` = b'$Lokale_Datenbank',
hardware.`Datenbank_SQL_Master` = '$Datenbank_SQL_Master',
hardware.`Instanzname` = '$Instanzname',
hardware.`Standort` = '$Standort_ID',
hardware.`Backup_mit` = '$Backup_mit',


verantwortlichkeit.`Rolle` = '$Rolle_ID',
verantwortlichkeit.`Hauptverantwortlicher` = '$Hauptverantwortlicher_ID',
verantwortlichkeit.`Stellvertretung` = '$Stellvertretung_ID',
verantwortlichkeit.`Wissenstraeger_1` = '$Wissenstraeger_1_ID',
verantwortlichkeit.`Wissenstraeger_2` = '$Wissenstraeger_2_ID',
verantwortlichkeit.`Verantwortlichkeit_extern` = '$Verantwortlichkeit_Extern_ID'


WHERE Sys.System_ID = $System_ID"


I have spent really much time for finding the solution but can not find anything why it is not updating. Could it be that the new refresh solution has the same problem but is not giving any errors? Or am i overseeing something?



If someone could help me, i would be very thankful.



regards
okanog










share|improve this question













I am doing my first php project and it's now getting for me little uncomfortable.
I want to update datasets in my database but when i execute the code nothing happens. First I tried to upload and refresh the site with:




header("location: Erfassen_Server.php");




Than i saw this Warning (The line 1029 is the line with header "location: Erfassen_Server.php" and the line 416 is just a row wich really not can be the source of the problem):




Cannot modify header information - headers already sent by (output
started at C:xampphtdocssystemübersichtErfassen_Server.php:416) in
C:xampphtdocssystemübersichtErfassen_Server.php on line 1029




I have googled the reason, but could not found any useful information to solve the problem. So i had the idea to change the refresh part of the script to another code witch does the same:



$secondsWait = 0;    echo '<meta http-equiv="refresh" content="'.$secondsWait.'">';


Now everything looks good in php, i have no more error messages, but the datasets in my database are not updating. They do absolutely nothing. The site is refreshing with the not changed values.
I have checked my update sql command in the mysql web interface with fixed values instead of variables and there it is working. I have also checked if all the variables are working, and they have as value the ID's wich i need, therefor i would say this should be okay too.



Here is the SQL-Update statement:



UPDATE `system` Sys 
JOIN service ON service.Servicename_ID = Sys.FK_Service_ID
JOIN Hardware ON Sys.System_ID = Hardware.FK_System_ID
JOIN Verantwortlichkeit ON Sys.System_ID = Verantwortlichkeit.FK_System_ID
JOIN system_zertifikat ON system_zertifikat.Zertifikate_ID = sys.Zertifikat
JOIN hardware_servername ON hardware.Servername = hardware_servername.Servername_ID
JOIN hardware_domaene ON hardware_domaene.Domaene_ID = hardware.Domaene
JOIN hardware_betriebssystem ON hardware_betriebssystem.Betriebssystem_ID = hardware.Betriebssystem
JOIN hardware_standort ON hardware_standort.Standort_ID = hardware.Standort
JOIN verantwortlichkeit_personen AS AA ON AA.Verantwortlichkeit_Personen_ID = sys.Hersteller
JOIN verantwortlichkeit_personen AS AB ON AB.Verantwortlichkeit_Personen_ID = sys.Externer_Partner
JOIN system_verfuegbarkeitsstufe ON system_verfuegbarkeitsstufe.Verfuegbarkeitsstufe_ID = sys.Verfuegbarkeitsstufe
JOIN system_systemname ON system_systemname.Systemname_ID = sys.Systemname
JOIN system_systemnummer ON system_systemnummer.Systemnummer_ID = sys.Systemnummer
JOIN verantwortlichkeit_rolle ON verantwortlichkeit_rolle.Verantwortlichkeit_Rolle_ID = verantwortlichkeit.Rolle
JOIN verantwortlichkeit_personen AS A0 ON A0.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Hauptverantwortlicher
JOIN verantwortlichkeit_personen AS A1 ON A1.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Stellvertretung
JOIN verantwortlichkeit_personen AS A2 ON A2.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Wissenstraeger_1
JOIN verantwortlichkeit_personen AS A3 ON A3.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Wissenstraeger_2
JOIN verantwortlichkeit_personen AS A4 ON A4.Verantwortlichkeit_Personen_ID = verantwortlichkeit.Verantwortlichkeit_extern


SET
Sys.Systemnummer = '$Systemnummer_ID',
Sys.Systembeschreibung = '$Systembeschreibung',
Sys.Hersteller = '$Hersteller_ID',
Sys.Externer_Partner = '$Externer_Partner_ID',
Sys.`BKAG_Brugg` = b'$BKAG_Brugg',
Sys.`BCIAG_Brugg` = b'$BCIAG_Brugg',
Sys.`Cables_Diverse_PL_CN_US_DE` = b'$Cables_Diverse',
Sys.`BINF` = b'$BINF',
Sys.`BRAG_Kleindoettingen` = b'$BRAG_Kleindoettingen',
Sys.`BRG_Wunstorf` = b'$BRG_Wunstorf',
Sys.`BGP_Nordhausen` = b'$BGP_Nordhausen',
Sys.`Pipes_Diverse_FR_PL_IT_US` = b'$Pipes_Diverse',
Sys.`Ropes_BDAG_Birr` = b'$Ropes_BDAG',
Sys.`HOLDING_Brugg` = b'$HOLDING_Brugg',
Sys.`BIAG_Brugg` = b'$BIAG_Brugg',
Sys.`BPK_Brugg` = b'$BPK_Brugg',
Sys.`Dritte_Schule_Brugg_LithCom_usw` = b'$Dritte',
Sys.`Verfuegbarkeitsstufe` = '$Verfuegbarkeitsstufe_ID',
Sys.`Datenverlust` = '$Datenverlust_ID',
Sys.`Systemname` = '$Systemname_ID',
Sys.`Zertifikat` = '$Zertifikat_ID',

hardware.`Servername` = '$Servername_ID',
hardware.`Domaene` = '$Domaene_ID',
hardware.`Betriebssystem` = '$Betriebssystem_ID',
hardware.`Lokale_Datenbank` = b'$Lokale_Datenbank',
hardware.`Datenbank_SQL_Master` = '$Datenbank_SQL_Master',
hardware.`Instanzname` = '$Instanzname',
hardware.`Standort` = '$Standort_ID',
hardware.`Backup_mit` = '$Backup_mit',


verantwortlichkeit.`Rolle` = '$Rolle_ID',
verantwortlichkeit.`Hauptverantwortlicher` = '$Hauptverantwortlicher_ID',
verantwortlichkeit.`Stellvertretung` = '$Stellvertretung_ID',
verantwortlichkeit.`Wissenstraeger_1` = '$Wissenstraeger_1_ID',
verantwortlichkeit.`Wissenstraeger_2` = '$Wissenstraeger_2_ID',
verantwortlichkeit.`Verantwortlichkeit_extern` = '$Verantwortlichkeit_Extern_ID'


WHERE Sys.System_ID = $System_ID"


I have spent really much time for finding the solution but can not find anything why it is not updating. Could it be that the new refresh solution has the same problem but is not giving any errors? Or am i overseeing something?



If someone could help me, i would be very thankful.



regards
okanog







php mysql sql-update page-refresh






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 19 at 11:04









Okan OG

33




33








  • 2




    You've posted a massive query with little explanation about what it does, or is supposed to be doing. Voting to close as too broad.
    – Tim Biegeleisen
    Nov 19 at 11:06










  • Hello @TimBiegeleisen I do not know what kind of extra information you are needing. The query should set a new value every time when I am updating the form, it should not matter if the value is changed to something else or it is still the same. The values from the database are showed as preselected default values on the php script. If you want to change the value, you can pick one from the linked listbox wich is dynamically listed from the values of tables in my database.
    – Okan OG
    Nov 19 at 12:24














  • 2




    You've posted a massive query with little explanation about what it does, or is supposed to be doing. Voting to close as too broad.
    – Tim Biegeleisen
    Nov 19 at 11:06










  • Hello @TimBiegeleisen I do not know what kind of extra information you are needing. The query should set a new value every time when I am updating the form, it should not matter if the value is changed to something else or it is still the same. The values from the database are showed as preselected default values on the php script. If you want to change the value, you can pick one from the linked listbox wich is dynamically listed from the values of tables in my database.
    – Okan OG
    Nov 19 at 12:24








2




2




You've posted a massive query with little explanation about what it does, or is supposed to be doing. Voting to close as too broad.
– Tim Biegeleisen
Nov 19 at 11:06




You've posted a massive query with little explanation about what it does, or is supposed to be doing. Voting to close as too broad.
– Tim Biegeleisen
Nov 19 at 11:06












Hello @TimBiegeleisen I do not know what kind of extra information you are needing. The query should set a new value every time when I am updating the form, it should not matter if the value is changed to something else or it is still the same. The values from the database are showed as preselected default values on the php script. If you want to change the value, you can pick one from the linked listbox wich is dynamically listed from the values of tables in my database.
– Okan OG
Nov 19 at 12:24




Hello @TimBiegeleisen I do not know what kind of extra information you are needing. The query should set a new value every time when I am updating the form, it should not matter if the value is changed to something else or it is still the same. The values from the database are showed as preselected default values on the php script. If you want to change the value, you can pick one from the linked listbox wich is dynamically listed from the values of tables in my database.
– Okan OG
Nov 19 at 12:24












1 Answer
1






active

oldest

votes

















up vote
0
down vote













It seems you have some output or another header function before the your header() function.
For the mysql query, you should using mysqli or PDO and bind the value instead push directly variable to query, it's deprecated in new PHP version.






share|improve this answer





















  • Hello @Mark Smith First of all thank you for taking the time and answering me. I do not knew if I understand you correctly. For the queries i have already used the function mysqli_query for example: $qry = mysqli_query($connect, $update);. I do not know what "PDO" is and how can I bind the value in without taking the variables in the query?
    – Okan OG
    Nov 19 at 12:11










  • You can start learn PDO by search google "pdo php example".
    – Mark Smith
    Nov 22 at 7:37











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53373266%2fmysql-update-command-over-php%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













It seems you have some output or another header function before the your header() function.
For the mysql query, you should using mysqli or PDO and bind the value instead push directly variable to query, it's deprecated in new PHP version.






share|improve this answer





















  • Hello @Mark Smith First of all thank you for taking the time and answering me. I do not knew if I understand you correctly. For the queries i have already used the function mysqli_query for example: $qry = mysqli_query($connect, $update);. I do not know what "PDO" is and how can I bind the value in without taking the variables in the query?
    – Okan OG
    Nov 19 at 12:11










  • You can start learn PDO by search google "pdo php example".
    – Mark Smith
    Nov 22 at 7:37















up vote
0
down vote













It seems you have some output or another header function before the your header() function.
For the mysql query, you should using mysqli or PDO and bind the value instead push directly variable to query, it's deprecated in new PHP version.






share|improve this answer





















  • Hello @Mark Smith First of all thank you for taking the time and answering me. I do not knew if I understand you correctly. For the queries i have already used the function mysqli_query for example: $qry = mysqli_query($connect, $update);. I do not know what "PDO" is and how can I bind the value in without taking the variables in the query?
    – Okan OG
    Nov 19 at 12:11










  • You can start learn PDO by search google "pdo php example".
    – Mark Smith
    Nov 22 at 7:37













up vote
0
down vote










up vote
0
down vote









It seems you have some output or another header function before the your header() function.
For the mysql query, you should using mysqli or PDO and bind the value instead push directly variable to query, it's deprecated in new PHP version.






share|improve this answer












It seems you have some output or another header function before the your header() function.
For the mysql query, you should using mysqli or PDO and bind the value instead push directly variable to query, it's deprecated in new PHP version.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 19 at 11:12









Mark Smith

284




284












  • Hello @Mark Smith First of all thank you for taking the time and answering me. I do not knew if I understand you correctly. For the queries i have already used the function mysqli_query for example: $qry = mysqli_query($connect, $update);. I do not know what "PDO" is and how can I bind the value in without taking the variables in the query?
    – Okan OG
    Nov 19 at 12:11










  • You can start learn PDO by search google "pdo php example".
    – Mark Smith
    Nov 22 at 7:37


















  • Hello @Mark Smith First of all thank you for taking the time and answering me. I do not knew if I understand you correctly. For the queries i have already used the function mysqli_query for example: $qry = mysqli_query($connect, $update);. I do not know what "PDO" is and how can I bind the value in without taking the variables in the query?
    – Okan OG
    Nov 19 at 12:11










  • You can start learn PDO by search google "pdo php example".
    – Mark Smith
    Nov 22 at 7:37
















Hello @Mark Smith First of all thank you for taking the time and answering me. I do not knew if I understand you correctly. For the queries i have already used the function mysqli_query for example: $qry = mysqli_query($connect, $update);. I do not know what "PDO" is and how can I bind the value in without taking the variables in the query?
– Okan OG
Nov 19 at 12:11




Hello @Mark Smith First of all thank you for taking the time and answering me. I do not knew if I understand you correctly. For the queries i have already used the function mysqli_query for example: $qry = mysqli_query($connect, $update);. I do not know what "PDO" is and how can I bind the value in without taking the variables in the query?
– Okan OG
Nov 19 at 12:11












You can start learn PDO by search google "pdo php example".
– Mark Smith
Nov 22 at 7:37




You can start learn PDO by search google "pdo php example".
– Mark Smith
Nov 22 at 7:37


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53373266%2fmysql-update-command-over-php%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Ottavio Pratesi

Tricia Helfer

15 giugno