diff --git a/Website/angebot.php b/Website/angebot.php
index 9342d6e..bf6ae24 100644
--- a/Website/angebot.php
+++ b/Website/angebot.php
@@ -82,7 +82,7 @@
"
" . htmlentities($row['nachfr_beschr']) . " | " .
"";
}
- ?>
+ ?>
Qualität
Lieferung |
Angebot |
- Günstigstes Angebot |
+ Alle Angebote vom Günstigsten zum Teuersten |
query("SELECT * FROM nachfrager
+ foreach ($db->query("
+ SELECT * FROM nachfrager
LEFT JOIN anbieter
ON nachfrager.erfassungs_id = anbieter.erfassungs_id
- WHERE nachfrager.benutzer_id = $user_id") as $row) {
+ WHERE nachfrager.benutzer_id = $user_id
+ ORDER BY anbieter.angebot_preis ASC
+ ") as $row) {
echo
"" .
"" . substr(htmlentities($row['nachfr_datum']),0,10) . " " . " | " .
@@ -54,9 +57,11 @@
}
if (!empty(htmlentities($row['angebot_preis']))) {
echo
- "" . "" .
+ " | " .
+ "" .
" | " .
"
";
} else {
diff --git a/Website/suche.php b/Website/suche.php
index bb18dff..41e776d 100644
--- a/Website/suche.php
+++ b/Website/suche.php
@@ -58,7 +58,7 @@ if (isset($_GET['keywords'])) {
Lieferdatum |
rowCount()) {
- while ($row = $query->fetch()) {
+ while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
echo
"" .
"" . substr(htmlentities($row['nachfr_datum']),0,10) . " " . " | " .
diff --git a/Website/xml2.php b/Website/xml2.php
new file mode 100644
index 0000000..8faa30d
--- /dev/null
+++ b/Website/xml2.php
@@ -0,0 +1,38 @@
+query("
+ SELECT * FROM nachfrager
+ RIGHT OUTER JOIN anbieter
+ ON nachfrager.erfassungs_id=anbieter.erfassungs_id
+ WHERE anbieter.angebot_id=$angebot_id
+ ");
+} else {
+ echo "ein problem ist aufgetreten.";
+ break;
+}
+//add root == artikel
+$artikel = $dom->appendChild($dom->createElement('artikel'));
+while ($result_array = $query->fetch(PDO::FETCH_ASSOC)) {
+ //loop through each key,value pair in row
+ foreach($result_array as $key => $value) {
+ //$key holds the table column name
+
+
+ //add track element to jukebox
+ $keys = $dom->createElement($key,$value);
+ $artikel->appendChild($keys);
+
+ }
+}
+$dom->formatOutput = true; // set the formatOutput attribute of domDocument to true
+
+// save XML as string or file
+$test1 = $dom->saveXML(); // put string in test1
+echo $test1;
+//$dom->save('test1.xml'); // save as file
+?>