[PHP-DB] Keeping entries of a select-box after submitting the form
Hi everyone, Well, I have already formulated my problem several times, always in a different way, but yet I have no solution. I try to say it as easy as it gets: I simply want one specific selction-box to 'keep' ALL options present after having submited the form! I'm thinking about a variable or something that contains all that options, and not just only ONE like the value-variable. I hope this is clear now. Regards, André -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Ignoring specific values in an inner join query?
Hi everybody. How to let mysql ignore specific values in an inner join query? In this case I want it to ignore Null-Values! $abfrage3="select distinct Anschriften.ID as aid, Anschriften.PLZ as aplz, Anschriften.STRASSE as astrasse, Anschriften.HNR as ahnr from Anschriften inner join Master on Anschriften.ID=Master.A inner join Master as m on Master.FN=m.FN inner join Personen on m.NN=Personen.ID where Personen.Name like '%$name%'"; Regards André -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Third addition: 'Transfering variables'
Ok, now I have made a simple example of what I want: My script is devided in a PHP and a HTML Part. I have kept out several queries, connections, table-tags etc. in the HTML part. Just imagine there are several entries in the -tag that is named "persona". What I want is to keep all the entries in a particular box, in this case: of the "persona"-option-box, AFTER the submit-button has been clicked and the page has reloaded. I hope you understand now. Regards and thanks, André //PHP Part //If a person has been selected if ($chg=='1') { print "Suchabfrage für ausgewählte Person"; $abfrage4 = "select distinct Anschriften.ID as aid, Anschriften.PLZ as aplz, Anschriften.STRASSE AS astrasse, Anschriften.HNR as ahnr from Anschriften inner join Master on Anschriften.ID=Master.A inner join Master as m on Master.FN=m.fn where m.NN = '$persona'"; $ergebnis3=mysql_query($abfrage4) or die("Anfrage results1 fehlgeschlagen"); $abfrage42 = "select distinct Firmennamen.ID as fid, Firmennamen.NAME as fname from Firmennamen inner join Master on Firmennamen.ID=Master.FN inner join Master as m on Master.A=m.A where m.NN='$persona'"; $ergebnis32=mysql_query($abfrage42) or die("Anfrage results2 fehlgeschlagen"); $abfrage43 = "select distinct Anschriften.ID as aid, Anschriften.PLZ as aplz, Anschriften.STRASSE AS astrasse, Anschriften.HNR AS ahnr FROM Anschriften INNER JOIN Master ON Anschriften.ID=Master.A WHERE Master.NN = '$persona'"; $ergebnis33=mysql_query($abfrage43) or die("Anfrage results3 fehlgeschlagen"); $abfrage44 = "select distinct Firmennamen.ID as fid, Firmennamen.NAME as fname from Firmennamen inner join Master on Firmennamen.ID=Master.FN where Master.NN='$persona'"; $ergebnis34=mysql_query($abfrage44) or die("Anfrage results4 fehlgeschlagen"); } //HTML Part print " k.A. "; while ($firm = mysql_fetch_array($ergebnis32, MYSQL_ASSOC)) { if ($chgf=='1') { $firma=$firm[fname]; } unset($self); if ($firmaa==$firm[fid]) { $self='selected'; } print "$firm[fname]"; } while ($firm2 = mysql_fetch_array($ergebnis34, MYSQL_ASSOC)) { if ($chgf=='1') { $firma=$firm2[fname]; } unset($self); if ($firmaa==$firm2[fid]) { $self='selected'; } print "$firm2[fname]"; } print " k.A."; while ($nsuche = mysql_fetch_array($ergebnis22, MYSQL_ASSOC)) { unset ($selp); if ($persona==$nsuche[pid]) { $selp='selected'; } print "$nsuche[pvname] $nsuche[pname] $nsuche[GEBURTSTAG]"; } while ($nsuche2 = mysql_fetch_array($ergebnis23, MYSQL_ASSOC)) { unset($selp); if ($persona==$nsuche2[pid]) { $selp='selected'; } print "$nsuche2[pvname] $nsuche2[pname] $nsuche2[GEBURTSTAG]"; } print" "; //** -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Seccond addition: 'Transfering variables'
Ok, the thing I accually want to do is to keep all the entries in one specific selection-option-box after the form has been submitted. I hope that is enough of explanation, because I cannot expect from you to go through my whole project... Regards, André -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] In Addition to 'Transfering variables'
I'm not sure if its get/post I need, beacause the variables are not a part of the form itself! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Transfering variables
Hi everybody! I'm wondering how to transfer variables in a php-document to the same script after the form has been submitted!? Thanks. André -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Query takes to much time
Hi everybody, now I have the following qery that still needs to much time: select distinct Anschriften.ID as aid, Anschriften.PLZ as aplz, Anschriften.STRASSE as astrasse, Anschriften.HNR as ahnr from Anschriften inner join Master on Anschriften.ID=Master.A inner join Master as m on Master.FN=m.FN inner join Personen on m.NN=Personen.ID where Personen.ID = "$id" It gives me the correct results I hope you can help me to get it faster! André -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Optimize following Mysql-Query
Hi Everyone, I have the following Mysql-Query that returns correct information, but it just needs to much time (3-4 Minutes!!) Can you help me to optimize it? $query= "SELECT * FROM Firmennamen INNER JOIN Master ON Firmennamen.ID=Master.FN WHERE Master.FN IN (SELECT Master.FN FROM Master INNER JOIN Personen ON Master.NN=Personen.ID WHERE Personen.NAME LIKE '%$name%')"; $result = mysql_query($abfrage2) or die("Anfrage results fehlgeschlagen"); Regards André Sannerholt -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] explode string variable
Hi everyone! Does anybody know how to "stop" an "explosion" of a string: Let me explain: $variable_aray=explode('-', $variable); I want the variable to be devided in only two other ones! If for example: $variable="Willy-Brandt-Platz-5" I want to have an array that looks like this: $variable_array[0] should be "Willy" $variable_array[1] should be "Brandt-Platz" Regards André -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Delete duplications from a mysql-resultset
I know the SELECT DISTINCT function. But I need to delete duplications from the finished resultset. Is that in any way possible? The result-set is not like an usual array, is it? I've tried the unique_array function, but it didn't work. André Sannerholt -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php