WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here!

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-10-2008, 09:21 AM
chandrika's Avatar
chandrika chandrika is offline
WebProWorld Veteran
 

Join Date: Oct 2005
Location: Cambridge, UK
Posts: 374
chandrika RepRank 1
Default Selecting certain results from SQL table

Code:
<?

$sql = "SELECT * FROM webref_rss_details limit 15";

$result = mysql_query($sql);

while($row = mysql_fetch_assoc($result)){

?>
The above query returns all the results from the webref_rss_details table.

If I want to only return results from that table that have say a "1" in the "bestsellers" column, is that quite simple, can I do some select from...where query?

If anyone knows a tutorial how to filter the results there, would be helpful..

thanks
__________________
Hairstyles - Pictures of 2008 hairstyles and a virtual hairstyler demo.
Price Comparison Site - Compare prices of well known brands and products.
Reply With Quote
  #2 (permalink)  
Old 06-10-2008, 09:30 AM
chandrika's Avatar
chandrika chandrika is offline
WebProWorld Veteran
 

Join Date: Oct 2005
Location: Cambridge, UK
Posts: 374
chandrika RepRank 1
Default Re: Selecting certain results from SQL table

Actually answered myself and just need put WHERE bestsellers= after the SELECT..

sorry sometimes just asking it out loud.....

thanks
__________________
Hairstyles - Pictures of 2008 hairstyles and a virtual hairstyler demo.
Price Comparison Site - Compare prices of well known brands and products.

Last edited by chandrika : 06-10-2008 at 09:31 AM. Reason: doh
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Tags: filter, sql



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

vB 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
Need help selecting Ecommerce Solution... indig0blue eCommerce Discussion Forum 11 01-25-2008 03:22 AM
Study Finds Strong Bias Towards Selecting Top Search Link WPW_Feedbot Search Engine Optimization Forum 0 09-27-2005 03:30 PM
Selecting more than one option within a list EmmaGale Database Discussion Forum 7 09-20-2005 01:00 PM
Selecting File Name? ergobob Search Engine Optimization Forum 6 07-05-2004 09:46 AM
Selecting an eCommerce Product Neo eCommerce Discussion Forum 4 10-29-2003 01:17 PM


Search Engine Friendly URLs by vBSEO 3.0.0