Re: Newbie Query: Error starting MySQL.

2005-11-19 Thread Gleb Paharenko
Hello. Start points for you problem: http://dev.mysql.com/doc/refman/5.0/en/can-not-connect-to-server.html http://dev.mysql.com/doc/refman/5.0/en/starting-server.html > socket=/home.dbdata/mysql/mysql.sock What is your client thinks about the location of mysqld socket? Put the same

Newbie Query: Error starting MySQL.

2005-11-17 Thread Sanjay Arora
Hi all First usage of MySQL. Newbie in Linux as well as MySQL. Using CentOS 4.2 with MySQL 4.1.12, rpm install. Changed the data directory. My /etc/my.conf --- [mysqld] datadir=/home.dbdata/mysql socket=/home.dbdata/mysql/mysql.sock # Default to using old password format for compa

RE: Newbie Query: Error starting MySQL..changed Data Directory

2005-11-15 Thread Sujay Koduri
without any problems and waiting for connections. >>ps -aux shows that mysql is running And for the same reason I mentioned above, you are seeing this. Hope this helps. sujay -Original Message- From: Sanjay Arora [mailto:[EMAIL PROTECTED] Sent: Monday, November 14, 2005 4:46 PM To: MySql

Newbie Query: Error starting MySQL..changed Data Directory

2005-11-15 Thread Sanjay Arora
Hi all First usage of MySQL. Newbie in Linux as well as MySQL. Using CentOS 4.2 with MySQL 4.1.12, rpm install. Changed the data directory. My /etc/my.conf [mysqld] datadir=/home.dbdata/mysql socket=/home.dbdata/mysql/mysql.sock # Default to using old password format for compatibility with mys

Re: Stupid Newbie Query Help with AND and OR logical operators

2004-05-08 Thread Eldo Skaria
Bob Cohen wrote: Here's my question. I wrote this query: Select * FROM name WHERE last LIKE "d" AND choice1="2" OR choice2="2" OR choice3="2"; What I'm looking for are records that satisfy the LIKE "d" condition But then, Only one of the three other con

Re: Stupid Newbie Query Help with AND and OR logical operators

2004-05-08 Thread Ingo Thierack
hi, you should set parentheses on it Select * FROM name WHERE last LIKE "d" AND (choice1="2" OR choice2="2" OR choice3="2"); without it interprets it as like "d" and choice1="2" or choice2="2" or choice3="2" Regards Ingo Thierack --On Freitag, 7. Mai 2004 13:51 -0400

Re: Stupid Newbie Query Help with AND and OR logical operators

2004-05-08 Thread Michael Stassen
Bob Cohen wrote: Here's my question. I wrote this query: Select * FROM name WHERE last LIKE "d" AND choice1="2" OR choice2="2" OR choice3="2"; To predict the outcome of this query requires knowledge of the precedence of AND vs. OR in mysql. I can't find it documented anywhere, but I think AND

RE: Stupid Newbie Query Help with AND and OR logical operators

2004-05-08 Thread Bob Cohen
Thanks to Bernard, Sunmaia, and Ingo! I knew the query wasn't quite right. Bob Cohen b.p.e.Creative http://www.bpecreative.com Design and production services for the web Put creative minds to work for you -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscr

Re: Stupid Newbie Query Help with AND and OR logical operators

2004-05-08 Thread Bernard Clement
You need parenthesis around cond1 OR cond2 OR cond3 otherwise effectively you are going to get all records matching the following: last "d" AND choice1="2" + choice2="2" + choice3="2" Therefore, you select statement should be written: SELECT * FROM name WHERE last LIKE "d" AND (choice1="2" OR ch

Stupid Newbie Query Help with AND and OR logical operators

2004-05-08 Thread Bob Cohen
Here's my question. I wrote this query: Select * FROM name WHERE last LIKE "d" AND choice1="2" OR choice2="2" OR choice3="2"; What I'm looking for are records that satisfy the LIKE "d" condition But then, Only one of the three other conditions need be t

Re: Newbie query question...

2004-02-04 Thread Michael Satterwhite
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wednesday 04 February 2004 16:03, mos wrote: > At 09:35 AM 2/4/2004, John Croson wrote: > >I have a simple query: > > > >SELECT id,year,month,day,cat_id FROM events > >LEFT JOIN calendar_cat ON > >events.cat=calendar_cat.cat_id > >WHERE year>=YEAR(C

Re: Newbie query question...

2004-02-04 Thread mos
At 09:35 AM 2/4/2004, John Croson wrote: I have a simple query: SELECT id,year,month,day,cat_id FROM events LEFT JOIN calendar_cat ON events.cat=calendar_cat.cat_id WHERE year>=YEAR(CURDATE()) AND month>=MONTH(CURDATE()) AND day>=DAYOFMONTH(CURDATE()) AND cat_id='2' OR cat_id='5' AND approved='1'

Re: Newbie query question...

2004-02-04 Thread Michael Stassen
Mike Johnson wrote: From: John Croson [mailto:[EMAIL PROTECTED] I have a simple query: SELECT id,year,month,day,cat_id FROM events LEFT JOIN calendar_cat ON events.cat=calendar_cat.cat_id WHERE year>=YEAR(CURDATE()) AND month>=MONTH(CURDATE()) AND day>=DAYOFMONTH(CURDATE()) AND cat_id='2' OR cat

Re: Newbie query question...

2004-02-04 Thread Johan Hook
Hi John, I think you missed on the precedence of AND/OR if you change to > AND (cat_id='2' OR cat_id='5' ) it should work as you want it to /Johan John Croson wrote: I have a simple query: SELECT id,year,month,day,cat_id FROM events LEFT JOIN calendar_cat ON events.cat=calendar_cat.cat_id WHERE ye

RE: Newbie query question...

2004-02-04 Thread Mike Johnson
From: John Croson [mailto:[EMAIL PROTECTED] > I have a simple query: > > SELECT id,year,month,day,cat_id FROM events > LEFT JOIN calendar_cat ON > events.cat=calendar_cat.cat_id > WHERE year>=YEAR(CURDATE()) > AND month>=MONTH(CURDATE()) > AND day>=DAYOFMONTH(CURDATE()) > AND cat_id='2' OR cat_id

Newbie query question...

2004-02-04 Thread John Croson
I have a simple query: SELECT id,year,month,day,cat_id FROM events LEFT JOIN calendar_cat ON events.cat=calendar_cat.cat_id WHERE year>=YEAR(CURDATE()) AND month>=MONTH(CURDATE()) AND day>=DAYOFMONTH(CURDATE()) AND cat_id='2' OR cat_id='5' AND approved='1' ORDER BY year,month,day ASC Results: +-

RE: Newbie Query Question

2003-03-16 Thread Uttam
: Newbie Query Question Hi all, My first post to this list. I have a query which I can't quite get to work. I was hoping that someone here could educate me a bit. I have two tables. tbl_people | id| fname|lname| --- | 1 |

Re: Newbie Query Question

2003-03-15 Thread Jeff Kilpatrick
Charles- OK, let's say a person has `n' interest id entries in tbl_people_interests. It seems like you're wanting a result set with one row per person and (n + 2) (assuming you're selecting first and last name with the interests). I'm no UEbergeek with respect to SQL, but I don't think there's

Re: Newbie Query Question

2003-03-15 Thread Charles Kline
Jeff, Thanks. This is ALMOST doing what I need. Suppose that the person could have from 0 - 5 records in tbl_peoples_interests and I need to have each one of those interests as a different name so I can use it in my PHP form? Thanks, Charles On Saturday, March 15, 2003, at 11:30 AM, Jeff Kil

Re: Newbie Query Question

2003-03-15 Thread Jeff Kilpatrick
Charles- So, you have a table unique with respect to people (a person appears at most once), and a table with interests (some number of interests are associated a person in the first table. This is a one-to-many relationship. You need to join on the person in the first table. Something like SE

Newbie Query Question

2003-03-15 Thread Charles Kline
Hi all, My first post to this list. I have a query which I can't quite get to work. I was hoping that someone here could educate me a bit. I have two tables. tbl_people | id| fname|lname| --- | 1 |frank |smith | t

Re: newbie query question

2002-09-12 Thread Jesse Sheidlower
On Thu, Sep 12, 2002 at 11:46:40AM -0700, Kip Krueger wrote: > > I need to query a mysql db in the following fashion ... > > "find me all records whose column 'n' have the letters 'XY' as the first two > characters." where column 'n' is just a short string > > to clarify ... > > if column 'n'

newbie query question

2002-09-12 Thread Kip Krueger
I need to query a mysql db in the following fashion ... "find me all records whose column 'n' have the letters 'XY' as the first two characters." where column 'n' is just a short string to clarify ... if column 'n' has the value "YR12345" don't get that record. if column 'n' has the value "XY

Re: Newbie query

2001-11-22 Thread Ivano Luberti
At 10.08 21/11/01 -0700, Steve Meyers wrote: >Wait for 4.1, it will have multi-table updates in it. Until then, >you'll have to use two separate queries. > >Steve i'm also new to mysql but i think you can use MERGE tables. Couldn't you ? == dott

Re: Newbie query

2001-11-21 Thread Steve Meyers
Wait for 4.1, it will have multi-table updates in it. Until then, you'll have to use two separate queries. Steve On Wed, 2001-11-21 at 07:28, Charles Allen wrote: > Hi, > > A v. basic question from a mySql newbie: > > I want to update a table based on the contents of another table. The SQL I

RE: Newbie query

2001-11-21 Thread Charles Allen
is correct? Thanks, Charles. -Original Message- From: Charles Allen [mailto:[EMAIL PROTECTED]] Sent: 21 November 2001 14:29 To: Mysql (E-mail) Subject: Newbie query Hi, A v. basic question from a mySql newbie: I want to update a table based on the contents of another table. The SQL I am

Newbie query

2001-11-21 Thread Charles Allen
Hi, A v. basic question from a mySql newbie: I want to update a table based on the contents of another table. The SQL I am trying to execute is: "update servers set servers.responsecount=servers.responsecount+1 where servers.gameid = lastsnapshot.gameid;" ie: Increment a responsecount for rows