iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar 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!

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-10-2008, 10:21 AM
chandrika's Avatar
WebProWorld Veteran
 
Join Date: Oct 2005
Location: Cambridge, UK
Posts: 371
chandrika RepRank 4chandrika RepRank 4chandrika RepRank 4
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
__________________
2009 Hairstyles - Pictures of 2009 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, 10:30 AM
chandrika's Avatar
WebProWorld Veteran
 
Join Date: Oct 2005
Location: Cambridge, UK
Posts: 371
chandrika RepRank 4chandrika RepRank 4chandrika RepRank 4
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
__________________
2009 Hairstyles - Pictures of 2009 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 10:31 AM. Reason: doh
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum

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


All times are GMT -4. The time now is 09:56 PM.



Search Engine Optimization by vBSEO 3.3.0