I am trying to display a vertical list from a database but I would like advice how to do it.
My database has the following fields:
list_facilities - Here is where the data list is stored (swimming pool, restaurant, bar, etc)
I would like to disply this data in a vertical list like this:
# Breakfast Included
# Internet Access
# Airport Pick Up
Unfortunately the words come in sequence.
Maybe my table design is weak. I could try the yes/no but I don´t know how to do it.
Mark it up using an unordered list: <ul><li></li>...</ul>.
Just what ray said, start with this:
Then tame those lists and you'll be sorted.
Thanks guys. However I another problem.
Let´s say I have 2 tables:
facilities ( facilities_id, facilities_name)
hotel_facilities ( hotel_id, facilities_id)
I am trying to get data from this tables with sql
then I show like this
$sql1="select * from hotel_facilities,facilities where
and acc_id= '$acc_id' order by facilities_name";
$busca1=mysql_query($sql1,$conexao) or die(mysql_error());
The problem is that this doesn´t show all data in the table, always missing one.
Wonder why and appreciate any help
Sorry. I'm not a PHP guy but one will come along I'm sure.
You have to remove the following line from the script.
"$lista1=mysql_fetch_array($busca1);" which is under
"$busca1=mysql_query($sql1,$conexao) or die(mysql_error()); ".
The reason is, mysql_fetch_array would skip one row.
Hope this will help you.
It worked perfectly. Thanks. The good be with you in 2005.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)