hilfe bin Anfänger

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • hilfe bin Anfänger

    Also ich bräuchte eine ilfe hier:

    Ich will daten auslesen aus mysql das schaff ich :

    <?php
    include ('db_login.php');
    $link = mysql_connect ($host, $user, $password);
    $query = "Select * from $tblname";
    $result = mysql_db_query ($dbname, $query, $link);

    while ($Row = mysql_fetch_array ($result))
    {
    print ("$Row[id]");
    print (" ");
    print ("$Row[text]");
    print ("<br>");
    }
    ?>

    aber ich habe drei Daten typen = id

    ich will das alle per id gereiht werden und nicht nach eintrag!

    also

    zb.: id1. text
    text

    id2. text
    id2. text

    id3. text
    id3. text

    bitte um Hilfe
    mfg jakob

  • #2
    $tblname?
    Definiert als Name der tabelle oder datenbank?

    Comment


    • #3
      tabellenname = tblname

      Comment


      • #4
        Jo das weiß ich, hab ma Beitrag editiert.

        zeig ma deine db_login.php auch her.

        Comment


        • #5
          $host = "localhost";
          $user = "user";
          $password = "password";
          $dbname = "test";
          $tblname = "test";
          Last edited by Jakob; 21-08-2005, 12:47.

          Comment


          • #6
            kommt keine fehlermeldung oder so?
            Probier ma das:

            PHP Code:
            <?php
                
            include ('db_login.php');
                
            $link mysql_connect ($host$user$password);
                
            mysql_db_query ($link);

                
            $query mysql_query("SELECT * FROM $tblname ORDER BY id");
                while (
            $row mysql_fetch_array ($query)){
                print (
            "$row[id]");
                print (
            " ");
                print (
            "$row[text]");
                print (
            "<br>");
                }
            ?>

            Comment


            • #7
              Danke funzt
              thx bis bald

              Comment


              • #8
                freut mich das ich helfen konnte *'np'*

                Comment

                Working...
                X