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
php mysql sql-update page-refresh
add a comment |
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
php mysql sql-update page-refresh
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
add a comment |
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
php mysql sql-update page-refresh
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
php mysql sql-update page-refresh
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
add a comment |
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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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