SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    text database help

    It seems that mysql on my friends server is screwy, so he asked me to help him make a news thingy.
    I was surfing the net and came across http://www.alexphpteam.com/ebs_english.htm and decided to use it.

    I'll use the examples on that link to pose my question.
    My database looks something like the following (I'm using the example database in the link above):
    PHP Code:
    <?php
    //###0
    $nblignes 1;
    $save_id 1;
    $declaration_tab[1] = "id";
    $declaration_tab[2] = "my_exemple1";
    $declaration_tab[3] = "my_exemple2";
    $declaration_tab[4] = "test";
    $auto_increment "id";
    //####0
     
    //####1
    $id[1] = "1";
    $my_exemple1[1] = "enregistrement 1";
    $my_exemple2[1] = "nouvel enregistrement";
    $test[1] = "dernier enregistrement";
    //####1
    ?>

    I made a page with the following to out put my info:
    PHP Code:
    <?php
    include ("exemple.ebs");
     
    $id_aff 2//one declares id to show
     
    $m 1;
    while (
    $m <= $nblignes//one looks for N of line of the corresponding picture(table)
     
    {
       if (
    $id_aff == $id[$m])
       {
       
    $i $m;
       break;
       }
    $m $m 1;
    }
     
    //One shows the recording selected in the screen
    echo "id = $id[$i]<br>my_exemple1 = $my_exemple1[$i]<br>my_exemple2 = $my_exemple2[$i]<br>test = $test[$i]";
    ?>
    I want to show all the records but the code they gave only shows one record.

    I want to use the info in the $nblignes (tells how many records there are) and have php run the above code as many times as records and pretty much have all the records in my database on the page.

    how can that be done?
    Last edited by therunes; Oct 8, 2001 at 13:51.

  2. #2
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, i tried to put it in side of an array to repeat and it still showed 1 result...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •