473,387 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Searching within an array in a table

Jay
Is it possible to search within a one-dimensional array in MySQL? For
example, say I had the follow table:
ID | Day | Hours
---+-----+------
1 | 1 | (1, 2, 3)
2 | 2 | (2, 3)
3 | 3 | (1, 3, 4)
4 | 4 | (1, 4)

Would it be possible to select all days that have a "2" in the Hours field?

Like:

SELECT Day FROM table WHERE "2" IN Hours;

or something to that extent.

Possible?

Thanks,
Jay

Jul 19 '05 #1
0 1290

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Sims | last post by:
Hi, Given a string $txt and an array of strings $txt_array what would be the best/fastest way to search in _insensitive_ case if $txt is in $text_array and, if it is, where is it? Because I...
6
by: Jay | last post by:
Is it possible to search within a one-dimensional array in MySQL? For example, say I had the follow table: ID | Day | Hours ---+-----+------ 1 | 1 | (1, 2, 3) 2 | 2 | (2, 3) 3 | 3 |...
5
by: Alan Mackenzie | last post by:
I've recently moved onto a C++ project with a large number of directories (several hundred) containing an even larger number of C++ source files. There are vastly more ways in C++ to obfuscate a...
1
by: Scott Handojo | last post by:
Lets say I have the following arrays X1 (1, 2, 7, 8) X2 (1, 2, 4, 6) X3 (1, 2, 3, 5) X4 (1, 3, 5) X5 (2, 3, 5) X6 (4, 5, 6, 8) My 'search array' is comprised of
5
by: Ada | last post by:
hello folks, just wanna get some feedback from someone here who has more experience. :-) i'm developing a small app that require searching for the highest index within a directory. i was...
5
by: David Wender | last post by:
I want to create a dataview with a sort on multiple columns. However, when I use FindRows, I only want to search some of the columns, not all. Is this possible? I have not been able to make it...
33
by: Geoff Jones | last post by:
Hiya I have a DataTable containing thousands of records. Each record has a primary key field called "ID" and another field called "PRODUCT" I want to retrieve the rows that satisy the following...
3
by: ANDY AIYER | last post by:
Guru's! Your time and guidance is much appreciated in this task that i am trying to get done. Background I have a SQL Server 2000 database table which contains 2 Fields (RecordID, XMLData...
3
by: Aaron | last post by:
I'm trying to parse a table on a webpage to pull down some data I need. The page is based off of information entered into a form. when you submit the data from the form it displays a...
3
by: Gene Kelley | last post by:
Hello PHPers, I'm trying to get at a single line within a text file. For instance, I want to print the line within a the file named "file.txt" that starts with "17:". file.txt contains...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.