<b>REGISTER</b>

GFX-Sector - PHP, MySQL


 
GFX-Sector » Coding Area » Webentwicklung » PHP, MySQL » Problem mit SQL navigation » Hello Guest [Login|Register]
Last Post | First Unread Post Print Page | Recommend to a Friend | Add Thread to Favorites

PHP, MySQL

Themen rund um die serverseitige Programmierung mit PHP in Verbindung mit der Datenbanksoftware MySQL
Pages (2): [1] 2 next » Post New Thread Post Reply

Problem mit SQL navigation

     Deutsche Version  English version
Author
Post « Previous Thread | Next Thread »

fahX
Zauberstabbenutzer


fahX hat kein Avatar

Registration Date: 21.08.2009
Posts: 14

Spacer
Problem mit SQL navigation

Problem mit SQL navigation

      

Hi leute, ich hoffe ihr könnt mir helfen, ich schreibe gerade ein ganz kleines cms für eine website und habe probleme mit der navigation.

Und zwar habe ich einen get parameter, namens "site" und die navi verweist auf diese.

Und ich will das sql so

php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
$site $_GET['site'];
    
    if ($site "unternehmen"){
        $sqlmysql_query("SELECT `text_titel`, `text_ueberschrift`, `text_content` FROM content_text WHERE text_titel = 'Unternehmensinformation'");    
        
    }
        
        
    if ($site "geschaeftsbereich"){
        $sqlmysql_query("SELECT `text_titel`, `text_ueberschrift`, `text_content` FROM content_text WHERE text_titel  = 'Geschaeftsbereich'");    
        
    }
        
    if ($site "referenzen"){
        $sqlmysql_query("SELECT `text_titel`, `text_ueberschrift`, `text_content` FROM content_text WHERE text_titel = 'Referenzen'");    
        
    }
        
        while ($ds mysql_fetch_object($sql)){
        $TextTitel $ds -> text_titel;
        $TextUeberschrift $ds -> text_ueberschrift;
        $TextContent $ds -> text_content;
        }
    if(mysql_error()) {
        echo "Fehler aufgetreten<br>";
        echo mysql_errno() . ": " mysql_error(). "\n";
        }
     else 
    echo '
    <div class="artikel_head"> <img src="bilder/' $TextUeberschrift '"  /> </div>
    <div id="text_content"> <img src="bilder/wienmitte.png" height="273" width="115" style="float:left; position:relative; left:15px; top:15px;" />
      <div id="text" >' $TextContent '
        '
        ?>
      </div>
    </div>
  </div>
</div>


darauf reagiert....
Aber irgendwie verändert sich das ganze nicht....
Problem mit SQL navigation 21.08.2009 18:23 fahX is offline Search for Posts by fahX

Chillkröte Chillkröte is a male
Scharfzeichner


Avatar von Chillkröte

Registration Date: 07.06.2009
Posts: 136
Location: BW

Spacer
      

dein Fehler liegt im Vergleichsoperator...
es muss heißen

php:
1:
if ($site == "irgendwas") { ... }

besser wäre natürlich eine switch-Abfrage!
Außerdem solltest du darauf achten, dass du HTML und PHP sauber von einander trennst, zum Beispiel mittels einem Template-System




:guckstduhier: mein Portfolio

Mit freundlichen Grüßen Chillkröte
Support via PN, ich nehme keine ICQ-Anfragen an!
Problem mit SQL navigation 21.08.2009 19:28 Chillkröte is offline Search for Posts by Chillkröte

fahX
Zauberstabbenutzer


fahX hat kein Avatar

Registration Date: 21.08.2009
Posts: 14

Thread Starter Thread Started by fahX
Spacer
      

DAAAANKE, so ein kleiner fehler ^^
Dumm das ich das nicht bemerkt habe...
Und wie meinst du das mit dem templatesystem?
http://england4a.en.funpic.de/hippKoor/i...schaeftsbereich

habs mal hochgeladen..
Und irgendwie schaff ich es auch nicht das sich der wrapper mit dem bg anpasst....

This post has been edited 1 time(s), it was last edited by fahX: 21.08.2009 19:32.

Problem mit SQL navigation 21.08.2009 19:30 fahX is offline Search for Posts by fahX

Chillkröte Chillkröte is a male
Scharfzeichner


Avatar von Chillkröte

Registration Date: 07.06.2009
Posts: 136
Location: BW

Spacer
      

bei mir kommt da ne leere Seite, wenn ich deinen Link aufrufe smile
Template-System




:guckstduhier: mein Portfolio

Mit freundlichen Grüßen Chillkröte
Support via PN, ich nehme keine ICQ-Anfragen an!
Problem mit SQL navigation 21.08.2009 19:42 Chillkröte is offline Search for Posts by Chillkröte

fahX
Zauberstabbenutzer


fahX hat kein Avatar

Registration Date: 21.08.2009
Posts: 14

Thread Starter Thread Started by fahX
Spacer
      

also bei mir wird es angezeigt....

Problem mit SQL navigation 21.08.2009 19:52 fahX is offline Search for Posts by fahX

Chillkröte Chillkröte is a male
Scharfzeichner


Avatar von Chillkröte

Registration Date: 07.06.2009
Posts: 136
Location: BW

Spacer
      

ich habe ne weiße Seite, im FF und im IE oO
vllt siehst du die Seite, weil diese noch in deinem Cache gespeichert ist? Oder mein Laptop ist am A***




:guckstduhier: mein Portfolio

Mit freundlichen Grüßen Chillkröte
Support via PN, ich nehme keine ICQ-Anfragen an!
Problem mit SQL navigation 21.08.2009 19:55 Chillkröte is offline Search for Posts by Chillkröte

Fireball Fireball is a male
Boardchef


Avatar von Fireball

Registration Date: 11.11.2006
Posts: 16,355
Classing-Rank: GFX-Sector
Location: Bremen, Deutschland
Program: Adobe Photoshop CS2
Deviantart: oenismaster
Forums: (alle)

Spacer
      

Negativ. Ich bekomme auch eine weiße Seite Wink



Problem mit SQL navigation 21.08.2009 19:55 Fireball is offline Homepage of Fireball Search for Posts by Fireball

fahX
Zauberstabbenutzer


fahX hat kein Avatar

Registration Date: 21.08.2009
Posts: 14

Thread Starter Thread Started by fahX
Spacer
      

komisch, ich kann mir nicht erklären warum das nicht angezeigt wird...

Problem mit SQL navigation 21.08.2009 20:01 fahX is offline Search for Posts by fahX

stOrm stOrm is a male
Fingerwischer


Avatar von stOrm

Registration Date: 10.09.2007
Posts: 47
Program: Photoshop

Spacer
      

der Echo befehl ist nicht richtig geschlossen!



 
Problem mit SQL navigation 21.08.2009 20:16 stOrm is offline Search for Posts by stOrm

Fireball Fireball is a male
Boardchef


Avatar von Fireball

Registration Date: 11.11.2006
Posts: 16,355
Classing-Rank: GFX-Sector
Location: Bremen, Deutschland
Program: Adobe Photoshop CS2
Deviantart: oenismaster
Forums: (alle)

Spacer
      

st0rm hat Recht smile
Da fehlt ein ; hinter dem zweiten ' Wink


Achja:
Ich habe deinen ersten Beitrag mal editiert und statt den CODE Tag den PHP Tag genommen, dann ists leserlicher Wink



Problem mit SQL navigation 21.08.2009 20:35 Fireball is offline Homepage of Fireball Search for Posts by Fireball

XLR XLR is a male
Ohnefiltergrafiker


Avatar von XLR

Registration Date: 29.07.2009
Posts: 265
Location: .de
Program: PS, C4D

Spacer
      

Leg dir ne IDE zu, dann schließt man so Flüchtigkeitsfehler aus.




"Everyone has talent; what is rare is the courage to follow the talent to the dark place where it leads." Erica Jong
Problem mit SQL navigation 21.08.2009 20:39 XLR is offline Homepage of XLR Search for Posts by XLR

fahX
Zauberstabbenutzer


fahX hat kein Avatar

Registration Date: 21.08.2009
Posts: 14

Thread Starter Thread Started by fahX
Spacer
      

http://www.hippkoor.at/hippKoor/index.php?site=referenzen
sooo
nun aber

This post has been edited 1 time(s), it was last edited by fahX: 21.08.2009 21:00.

Problem mit SQL navigation 21.08.2009 20:56 fahX is offline Search for Posts by fahX

Fireball Fireball is a male
Boardchef


Avatar von Fireball

Registration Date: 11.11.2006
Posts: 16,355
Classing-Rank: GFX-Sector
Location: Bremen, Deutschland
Program: Adobe Photoshop CS2
Deviantart: oenismaster
Forums: (alle)

Spacer
      

Jetzt funktioniert alles wunderbar smile

Was ich dir empfehlen kann:
Da die URL-Struktur mit den dynamischen Parametern doch eher benutzerunfreundlich und nicht gerade schön ist, empfehle ich dir den Einsatz von Mod_Rewrite.
Dann sieht deine URL nicht mehr "index.php?site=geschaeftsbereich" aus, sondern z.B. "geschaeftsbereich.html".

Was genau Mod_Rewrite ist und wie dieses funktioniert -> Google it Wink



Problem mit SQL navigation 21.08.2009 21:02 Fireball is offline Homepage of Fireball Search for Posts by Fireball

fahX
Zauberstabbenutzer


fahX hat kein Avatar

Registration Date: 21.08.2009
Posts: 14

Thread Starter Thread Started by fahX
Spacer
      

Werd ich mir mal ansehen, danke Wink
Aber ein problem hab ich noch mit dem wrapper, der will sich nicht richtig anpassen an den text....
Kann mir da villeicht wer helfen?

Problem mit SQL navigation 21.08.2009 21:04 fahX is offline Search for Posts by fahX

XLR XLR is a male
Ohnefiltergrafiker


Avatar von XLR

Registration Date: 29.07.2009
Posts: 265
Location: .de
Program: PS, C4D

Spacer
      

Sehe nur dass dein Footer nicht das macht was er soll. Kp was für nen Wrapper du meinst.




"Everyone has talent; what is rare is the courage to follow the talent to the dark place where it leads." Erica Jong
Problem mit SQL navigation 21.08.2009 21:31 XLR is offline Homepage of XLR Search for Posts by XLR
 
Spacer
   
GFX-Sector
unregistered


 hat kein Avatar


Spacer

Have you enjoyed this topic?


If you were enjoying this post and if you keen on reading more interesting stuff then do not hesitate to complete the free sign up.

After the free registration you will gain access to all areas and you will be able to communicate with other artists from all over the world.

In addition you will benefit from our Photoshop and coding section as well as from our huge (hundreds of gigabytes) free resource section where you can find everything you will need to be a successful (web) designer/artist.

Sign up now and enjoy the advantages as a registered member.

(This website will be ad-free after a complete free sign up.)

New Post 22.08.2009 20:40  
Pages (2): [1] 2 next » Tree Structure | Board Structure
Post New Thread Post Reply
GFX-Sector » Coding Area » Webentwicklung » PHP, MySQL » Problem mit SQL navigation

Similar topics to Problem mit SQL navigation
Thread
Laptopdarstellung/grafikeigenscahften[Problem] (Forum: Multimedia)
Sasuke Uchiha | Mit abstand beste sig die ich je gemacht hab (Forum: Signaturen/Avatare)
Teamspeak 29.10.07 mit Para, Mr. Tool, NeoX, 2 anderen Leuten und mir (Forum: Fun & Spam)
First Work mit einem Set (Forum: Signaturen/Avatare)
CoLlAbO mIt ZeRo (Forum: Signaturen/Avatare)