Portal Home > Knowledgebase > Articles Database > Display mysql_fetch_assoc results in 2 columns WITH tags!!


Display mysql_fetch_assoc results in 2 columns WITH tags!!




Posted by Librarian, 12-27-2010, 01:42 PM
Oh, please pity me! I'm a librarian, not a computer programmer! I've been searching for a solution to this for a week and I'm on the verge of tears. All I want to do is make the following code display in two columns: "; mysql_free_result($res); mysql_close($link); ?>
". $row["name"] . $row["url"] ."
What I have is a database with directory type information. What I want is one web page which displays only the "name" field as a hyperlink, which, when selected, takes the user to a separate web page containing the full directory information. Oh please end my misery! Thank you!

Posted by Ben N, 12-27-2010, 02:24 PM
Try this for two columns, there may be a simpler way to do it but it's late over here Don't worry about mysql_close or mysql_free_result as there is no gain in using them for this short script. The mysql connection will close when the script is finished anyway.

Posted by xuid, 12-27-2010, 03:00 PM
Here you go:

Posted by Librarian, 12-28-2010, 09:16 AM
Thank you so much XUID! You're an If you've ever banged your head trying to solve what should be a simple problem, you'll know how relieved and grateful I am to you! Have a fabulous new year!



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Great Forum (Views: 652)

Language: