Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 18-11-2008, 12:32 AM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Nov 2008
Posts: 1
Default Using PHP to filter results from an SQL table.


Hi Guys,

I am new to php so this problem may be simple for you guys.

I currently have a web page with PHP code that pulls all the information from a mysql database and displays it on the web page. What I would like is to have another page which would filter the results according to which link is clicked.

For example: The database is based on cars. When the user uses the website, they will see a page with all the car manufacturers listed. When the user clicks on one of the manufacturers, it takes them to the next page which has now fitered the results and only shows the records from that particular manufacturer.

I hope my explanation is ok. Your help would be greatly appreciated, I have been playing around with this for ages with no luck.

Thanks
erik7584 is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 18-11-2008, 12:57 AM   #2 (permalink)
हॉर्न ओके प्लीज़
 
victor_rambo's Avatar
 
Join Date: Sep 2007
Posts: 1,493
Default Re: Using PHP to filter results from an SQL table.

Retrieving all rows and then filtering using PHP is a wastage of resources. It will make your site slower than a snail.Instead, use MySQL's power to SELECT only those rows that satisfy a particular condition.

Eg:
Code:
SELECT * FROM cars WHERE manufacturer='Ford';
And I suggest you go through some PHP-MySQL tutorials.I suggest the below site for a beginner's tutorial: http://www.freewebmasterhelp.com/tutorials/phpmysql
__________________
विक्टर रॅंबो - चाणकया प्रभावित व्यक्ति

गीक होना माँगता
victor_rambo is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
content filter choklate_007 Software Q&A 6 07-02-2009 12:47 PM
Gmail filter is acting up! phreak0ut Internet & WWW 6 06-11-2007 07:14 PM
Filter in Gmail anilthomas26 Internet & WWW 1 12-04-2006 02:31 AM
How do I filter my google ads Wizard Internet & WWW 1 17-06-2005 12:49 AM
How to filter out spam tuxfan QnA (read only) 7 28-10-2004 12:34 PM

 
Latest Threads
- by gforz
- by soumya
- by Sujeet
- by icebags
- by Charan

Advertisement




All times are GMT +5.5. The time now is 02:59 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2