Re: Help with WHERE string searching

2002-09-06 Thread Jed Verity
nd. They will be typed in by the > user. > > Like if the user types in a keyword of "cat" I want to > only return titles with the word "cat" but not "cats" > or "catalog" > > I had thought to search for '% cat %' but the k

Re: Help with WHERE string searching

2002-09-06 Thread Jed Verity
Hi, Rob, Easily resolved. Use 'not like' in conjunction with 'like': WHERE ((title like '%man%') or (title like '%men%')) and title not like '%woman%' and title not like '%women%' Does that work? HTH! Jed On the threshold of genius, Rob Gambit wrote: > Hello MySQL mailing list. > > I am havi

Re: select statements

2002-09-06 Thread Jed Verity
k, it needs to be the second one. If necessary, you can just walk through the array, adding the quotes: Does that work? HTH! Jed On the threshold of genius, Ian Osterberg wrote: > Thanks Jed, > > I'm still stuck though > > I did as you suggested > > - Original Messa

Re: select statements

2002-09-05 Thread Jed Verity
Hello, Jules, You can use the "value in (a,b,c)" format. If necessary, implode your array and do something like this: SELECT emailAddress FROM subscribers_html WHERE mailingGroup value in ($toText); Check the documentation, if necessary, for usage of implode and "value in". HTH! Jed On the th

Re: need help on a SQL query: need LEFT JOIN?

2002-09-05 Thread Jed Verity
Does this work? select t.id,t.option,t2.option from tableName t left join tableName t2 on t.id=t2.id and t2.option!=t.option where t.option="a" and isnull(t2.option); HTH, Jed On the threshold of genius, [EMAIL PROTECTED] wrote: > I apologize for asking such a basic SQL question, but I am fail

Re: MySQL Query

2002-09-02 Thread Jed Verity
Hello, Abhilash, If you just want the number of days between two dates, you don't need FROM_DAYS. FROM_DAYS gives you a date. This should be all you need: Select TO_DAYS(CURDATE()) - TO_DAYS('2001-08-30'); HTH, Jed On the threshold of genius, [EMAIL PROTECTED] wrote: > Hi, > My intention is

Re: select using 2 left joins

2002-09-02 Thread Jed Verity
I'm a little surprised that MySQL isn't giving you an error on the ambiguity of manufacturersID=12. What happens if you specify tableName.manufacturersID=12? HTH, Jed On the threshold of genius, Wilbert Enserink wrote: > Hi all, > > > I'm having troubles with a good selection statement in my

Re: like problem

2002-08-29 Thread Jed Verity
How about select a.name from table1 a, table2 b where a.name like concat("%",b.name,"%"); You might want to read chapter 6.3 in the mysql manual: http://www.mysql.com/doc/en/Functions.html HTH, Jed On the threshold of genius, Jorge Martinez wrote: > yes, but select a.name from table1 a, table

Re: PHP form to mySQL

2002-08-10 Thread Jed Verity
Hi, Jerry, Here's your simplified form: Here is the page "addcontacts.php": It would be a good idea too, of course, to add some error-checking in there. Plenty of documentation on that stuff at http://php.net . Good luck! Jed On the threshold of genius, JeRRy w

Re: R: Query problem

2002-07-05 Thread Jed Verity
| > +-++--+ > > I hope this helps you to better understand my problem. > If I could touch the database I would split BASIC_DATA into two different > tables AUTHORS and PUBLISHERS. But I cannot touch the DB structure. > > Gigi &g

Re: Query problem

2002-07-05 Thread Jed Verity
Hello, Gigi, By "decoded", do you mean that you want the words "Author" and "Publisher" to appear in your table instead of "1" and "2"? And you can't create or modify tables? Short of replacing the codes in the columns, it seems to me that you'd need to have a decode table. Something like: +

Re: SQL design/query question

2002-07-02 Thread Jed Verity
You need a LEFT JOIN. Read about it here: http://www.w3schools.com/sql/sql_join.asp Go down to the "LEFT JOIN" section. HTH, Jed I liked it when Chris Griffin wrote this to me: > If this is not the right list for this please direct me to the proper > list. > > I have a table of name/address

Re: help on update

2002-07-02 Thread Jed Verity
Hi, Matthew, Have you tried: "insert into test (test) values ('work')" Or "update test set test='test'" I liked it when Matthew Hajda wrote this to me: > Hello, > > I am having some issues inserting and updating with mySQL. > > Database: asdf > Table: test > field: idfield (int, autoincrem

Re: Need examples of companies using mysql

2001-03-30 Thread Jed Verity
AM, I myself have full > faith in mysql. > > Thanks - Ant ~)~)~)~)~)~)~)~)~)~)~)~)~)~)~)~)~)~) Jed Verity Chief Technology Officer Communication Works Pier 9 Embarcadero, Suite 116 San Francisco, CA 94111 www.communicationworks.org