Re: Re: enum !!
| From: | McShen | Date: | Mon, 16 Jul 2001 22:21:09 +0000 |
| Subject: | Re: Re: enum !! | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-10479@lists.php.net to get a copy of this message | ||
thx alot!
"Doug Semig" <dougslist@semig.com> wrote in message
news:3.0.6.32.20010716160122.007f0bf0@mail.glis.net...
> I applaud your efforts to learn SQL.
>
> I wonder, though, if the PHP-DB list the best place to learn SQL. I would
> think that a book or a web-based tutorial on SQL would be more conducive
to
> your efforts.
>
> In the example you have given below, you would probably want to use LIKE.
> For example, "SELECT * FROM test WHERE cat LIKE '%c%';" or similar ought
to
> do it. Of course, I hope that the example is merely an example because if
> you really designed a production table like that then you wouldn't be
> taking advantage of the "relational" part of your relational database
> management system.
>
> So please keep learning SQL...it's a fantastic skill to have. If you have
> a specific SQL problem every once in a while there are those on this list
> who would undoubtedly enjoy helping out. Several beginner-level questions
> back-to-back, though, is way beyond the charter of this mailing list. The
> overall purpose of this particular mailing list is for discussions about
> PHP's ability to interface with databases. There may possibly be an SQL
> beginners mailing list on egroups or someplace similar...you might find an
> environment like that better than the PHP-DB list to help you with this
stuff.
>
> Doug
>
> At 02:56 PM 7/16/01 -0400, McShen wrote:
> >ok. I use set to make a table. here is my table 'test'
> >+-------+------+
> >| name | cat |
> >+-------+------+
> >| shen | a,c |
> >| shen1 | b,c |
> >+-------+------+
> >
> >How can I find all records that contain 'c'?
> >i tried
> >select * from test where cat='c';
> ...snip...
>
>