Jump to content

Recommended Posts

hi all

 

i am calling all data from a database and listing it in a table. The main trouble is that some sections will have a large amount of data in them with different categories. for example, i have a db of mobile phone manufacturers and models. as you can imagine there are a lot of them. so far i have the data paged with 30 results a page and it is all listed in alphabetical order by manufacturer so it is relatively easy to find data if you keep clicking through the lists.

 

what i would like to do is have a set of links (which i have done using manufacturer as the title). how do i use those links for the following:

 

if i click on Nokia for instance, how do i get ALL Nokia only phones listed and not show any other data?

Link to comment
https://forums.phpfreaks.com/topic/74573-php-and-mysql-show-only-from-list/
Share on other sites

i am a newbie to the php world, but heres an idea.

 

Couldn't you create a page with a simple form with a drop down list of all the manufacturers. Then create a php scrpit that runs a query on your database with the value of that form once submitted.

 

 

it's a good idea. one i have thought about doing. my client is somewhat daft and he has asked for a specific way of doing this.

 

i see similar things on blogs with the archive sections.  link is created for a given month, clicking it will list all posts from that month so my client is asking me to do the same thing for the app i am building. i have no idea what you would call this function so i am having trouble googling for it.

 

 

well the simple way to do it will be to create a php page for every single manufacturer. Then link each manufactuerer to there specific php file. In the php file will be a simple select statement with the manufacturers name in it already .

 

This is time consuming and as i dont know php well i couldn't suggest a function to do it.

time consumption is not so much of a worry and it is a way of doing it. i would much prefer to have the function auto generate the page etc otherwise i am going to end up with a few hundred pages just to get what i need.

 

i will keep thinking about it.

 

anyone else have anything to throw into the mix?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.