PDA

View Full Version : php datbases and urls



Unregistered
09-05-2001, 01:40 PM
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

Unregistered
09-06-2001, 05:35 PM
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.

Tiger
10-04-2001, 07:27 AM
> 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.....