GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 24-Dec-2007, 09:52
Richardknox Richardknox is offline
Junior Member
 
Join Date: Nov 2006
Location: Michigan
Posts: 83
Richardknox is on a distinguished road

Mysql Data Offline


I have a Mysql database that I want to take certain entries off line if I find the data outdated. I have added a column to the data table that I want to use to indicate this dataentry is offline (Y/N). Can any one either show me how, or point me to information on how to read this entry in this table and know to ingore this data when searching.

Thanks,
Richard
  #2  
Old 25-Dec-2007, 03:48
admin's Avatar
admin admin is offline
Administrator
 
Join Date: Sep 2002
Posts: 841
admin will become famous soon enough

Re: Mysql Data Offline


It depends, but as usual it is difficult to suggest anything without having details about the table structure and other information.

The simplest suggestion I can offer is for you to add a HAVING condition appended to your original SQL query. This way you probably don't need to worry about adding an index for this new column.

An example follows:

Code:
; MYSQL SELECT * FROM `my_table` WHERE `country_code`='US' HAVING `is_offline`='n'

Something like that...
__________________
Custom BB codes you can use here:
[HTML] | [C++] | [CSS] | [JAVA] | [PY] | [VB]
  #3  
Old 25-Dec-2007, 16:24
Richardknox Richardknox is offline
Junior Member
 
Join Date: Nov 2006
Location: Michigan
Posts: 83
Richardknox is on a distinguished road

Re: Mysql Data Offline


Even though I ony gave a little information, you were able to pull it out in the end.


Thanks, your suggestion works just fine.

Again,

Thanks,
Richard
 
 

Recent GIDBlogToyota - 2009 May Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory leak when nothing is happening... How can I even debug this ? Algar MS Visual C++ / MFC Forum 10 19-Nov-2007 08:17
[Include] Doubly-linked List dsmith C Programming Language 6 14-Apr-2006 14:12
Strange C++ code memory leakage problem gaoanyu C++ Forum 7 04-Nov-2005 09:09
[CONTEST?]Data Structure Test dsmith C Programming Language 2 06-Jun-2004 16:13

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 14:17.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.