TechSpott - Computer and technology forums

Go Back   TechSpott - Computer and technology forums > Webmasters > Database Management > MySQL
MySQL Forum dedicated to the world's most popular open source database engine.

Reply
 
Thread Tools Display Modes
Old February 20th, 2010, 11:04 PM   #1 (permalink)
Jessica
TechSpott Newbie
 
Join Date: Feb 2010
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Jessica is an unknown quantity at this point
Default Fetching data from table

Hi,

I have a table consisting five columns Card No, Sdate, Edate, ATime, Etime

Now i want to get three columns info CardNo, Sdate, Edate from table. But i am facing problem when i get input from user to get their required info. For example user want to exact CRad name & his info from a specific Sdate to Edate.

Any effort will be appreciated .
Jessica is offline   Reply With Quote Share with Facebook
Old February 20th, 2010, 11:09 PM   #2 (permalink)
Neobux
Junior Member
 
Join Date: Feb 2010
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Neobux is an unknown quantity at this point
Default

Quote:
Originally Posted by Jessica View Post
Hi,

I have a table consisting five columns Card No, Sdate, Edate, ATime, Etime

Now i want to get three columns info CardNo, Sdate, Edate from table. But i am facing problem when i get input from user to get their required info. For example user want to exact CRad name & his info from a specific Sdate to Edate.

Any effort will be appreciated .
Following might help.. If SDate and EDate are date type columns..

SELECT CardNo, SDate, EDate FROM table WHERE SDate > INPUT_DATE AND EDate < INPUT_DATE

Alternately better method is..

SELECT CardNo, SDate, EDate FROM table WHERE INPUT_DATE BETWEEN SDate AND EDate
Neobux is offline   Reply With Quote Share with Facebook
Reply

Bookmarks

Tags
data, fetching, table


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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


 
Forum Stats
Members: 14,314
Threads: 20,322
Posts: 27,656
Total Online: 34

Newest Member: Webchatfep

Latest Threads

Advertisements

Support our advertisers!

Amazon
Sears
Macys
1800flowers.com
Drugstore.com


Carbonite Online-Backups
Tiger Direct
Tech Depot
Buy.com
Office Depot
Fatcow
HostGator


TripsNow.us
Marriott
Expedia
CheapTickets.com
OneTravel
Hotwire

Are you a Fan?

Share this on Facebook

Tag Cloud

Partner Links


Contact Us - Home - Archive - Privacy Statement - Top - Copyright © 2009-2010, TechSpott - All times are GMT -4. Time is 04:08 AM

Powered by vBulletin® Copyright © Jelsoft Enterprises Ltd. :: SEO by vBSEO