php datbases and urls

This is a discussion on php datbases and urls within the Linux Programming forums, part of the Platform Specific Boards category; i have a mysql database written in php4. i cna add, modify list etc very nicely. I have 4 feilds ...

  1. #1
    Unregistered
    Guest

    Question php datbases and urls

    i have a mysql database written in php4.

    i cna add, modify list etc very nicely. I have 4 feilds in the db and can search and display all the results. howver, in my last feild, i want to display a link to whatever is in the feild.

    currently, i'm using an <a href> statement. i will link, but the script displays the row number. how do i get it to display what ever is in the db, and link to it?

    if anyone can help, i'd be much appreciated.

    thanks in advance

    http://www.iainpb.co.uk/onlinetools/case/main.php
    --jock
    jock@termisoc.org

  2. #2
    Unregistered
    Guest
    fixed it! it was late, and i was sober so i missed the most obviouse thing!

    anyway, got it working! so i'm happy! updated the database fully now!

    ps: the code that i fixed look slike this....

    while (($row = mysql_fetch_object($result))){

    printf("<TR valign=\"top\">
    <TD valign=\"top\"><font face=arial size=2>%s</font></TD>
    <TD valign=\"top\"><font face=arial size=2>%s</font></TD>
    <TD valign=\"top\"><font face=arial size=2>%s</font></TD>
    <TD valign=\"top\"><font face=arial size=2><a href=\"$row->EXTRA\" target=\"_blank\">%s</a></font></TD>

    </TR>\n",
    $row->ACCRONYM, $row->DEFINITION, $row->DESCRIPTION, $row->EXTRA,
    $row->ROWID, $row->ROWID) ;
    }

    the %s comes from the string in the table feild.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    16
    > i have a mysql database written in php4.

    AFAIK, MySQL was written in C. MySQL _databases_ are not written in anything, technically.

    > i cna add, modify list etc very nicely. I have 4 feilds in the db and can search and display all the results. howver, in my last feild, i want to display a link to whatever is in the feild.

    Cna? Feilds? Howver? OK.....
    The box said 'Windows NT or better', so I installed Linux.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21