Welcome to dbFreaks.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

MySQL - question about displaying data

 
   Database Help (Home) -> PHP SQL RSS
Next:  oops  
Author Message
Info

External


Since: Feb 20, 2005
Posts: 4



(Msg. 1) Posted: Sun Feb 20, 2005 5:36 pm
Post subject: MySQL - question about displaying data
Archived from groups: alt>php>sql (more info?)

I am working an some pages that have database content on them. I'm sorry
that I don't have any versions of it online yet, but it isn't hard to
explain.

The site lists restaurants with contact information. All of the information
is kept in a MySQL database.

I want to display the information in several fomats an am looking for
tutorials or advice on how to do it.

The first way is on a 'Restaurants' page. It lists just the names of the
restaurants and maybe the city, for example.

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Restaurant 1, City
Restuarant 2, City

I want it so that when you click on a letter it pulls up restaurants
beginning with that letter. When the list gets too long I want it to only
display, say 25 records, and then to display links at the bottom to view the
next page of results if there are any more pages of results. I'm also going
to have a way to search by cuisine, or browse all listings and I will also
need that "view more results" links on those pages.

I also want the site to behave so that when the user clicks on a restaurant
it loads the complete information about that restaurant. I can already
display the information but I don't know how to do it so that when someone
clicks on a specific restaurant name, it loads the information from that
specific restaurant. Do I need to use sessions to pass a variable from one
page to another page that will take the variable and use it to SELECT * FROM
table1 WHERE name='$my_variable' (or whatever)? I don't know how to use
sessions yet but will learn if I have to.

Thanks in advance... I couldn't find anything about this in my PHP/MySQL
book or online in tutorials. I'm not sure where to look.

 >> Stay informed about: MySQL - question about displaying data 
Back to top
Login to vote
PHP

External


Since: Feb 20, 2005
Posts: 4



(Msg. 2) Posted: Sun Feb 20, 2005 5:53 pm
Post subject: Re: MySQL - question about displaying data [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

An example of one of the things that I want to do can be found on this page:
<a style='text-decoration: underline;' href="http://www.phpfreaks.com/tutorials/41/1.php." target="_blank">http://www.phpfreaks.com/tutorials/41/1.php.</a> There are numbers at the
bottom [1] [2] [3] [4] [5] -- so instead of displaying the entire result on
one page, it is broken up into several pages.



"Info" <no spam> wrote in message news:111i0lm4jrvb486@corp.supernews.com...
 >I am working an some pages that have database content on them. I'm sorry
 >that I don't have any versions of it online yet, but it isn't hard to
 >explain.
 >
 > The site lists restaurants with contact information. All of the
 > information is kept in a MySQL database.
 >
 > I want to display the information in several fomats an am looking for
 > tutorials or advice on how to do it.
 >
 > The first way is on a 'Restaurants' page. It lists just the names of the
 > restaurants and maybe the city, for example.
 >
 > A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
 >
 > Restaurant 1, City
 > Restuarant 2, City
 >
 > I want it so that when you click on a letter it pulls up restaurants
 > beginning with that letter. When the list gets too long I want it to only
 > display, say 25 records, and then to display links at the bottom to view
 > the next page of results if there are any more pages of results. I'm also
 > going to have a way to search by cuisine, or browse all listings and I
 > will also need that "view more results" links on those pages.
 >
 > I also want the site to behave so that when the user clicks on a
 > restaurant it loads the complete information about that restaurant. I can
 > already display the information but I don't know how to do it so that when
 > someone clicks on a specific restaurant name, it loads the information
 > from that specific restaurant. Do I need to use sessions to pass a
 > variable from one page to another page that will take the variable and use
 > it to SELECT * FROM table1 WHERE name='$my_variable' (or whatever)? I
 > don't know how to use sessions yet but will learn if I have to.
 >
 > Thanks in advance... I couldn't find anything about this in my PHP/MySQL
 > book or online in tutorials. I'm not sure where to look.
 >
 ><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: MySQL - question about displaying data 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
simple question I think...about PHP/mySQL - I want to make a website that starts with letters A thru Z . Click on the letter A you get a list of surnames beginning with A.... Click on surname A..... you get a table with all the information from a mySQL on the people with that surnames. My simpl...

php + MySQL problems - I'm trying to get php + MySQL running on my web server. I tested the setup on an old RH8 server install that I was going to upgrade; everything worked fine. So I wiped out the old RedHat, installed Fedora Core 2, and repeated the installation. No dice...

Accounts in Mysql - Hello, Learning about Mysql Accounts, there is something I like to ask for. I have made some database tests as root mysql with [gastonv@telenetPC ~]$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL....

php and mySql - I get an error message while trying to follow these procedures: http://www.howtoforge.com/intrusion-...on-ubuntu-7.10 Here is the error: Fatal error: Call to undefined function mysql_connect() in /var/www/adodb5/drivers/adodb-mysql.inc.php on line 363..

[MySQL] hierachy problem ... - Hello, I have a table which have these fields: - id - idParent - label I would like to display each field and his children but each parent may have no child. Example: A AA AB AC B C CA CB .... I can't write the request, could you help me?....
   Database Help (Home) -> PHP SQL All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]